Back to browse
GitHub Repository

Expressive assertions for Go. Make your tests readable, elegant, and easy to debug.

43 starsGo

Should – Expressive Assertions for Go

by andrey-1201·Apr 21, 2026·8 points·0 comments

AI Analysis

MidCozyNiche Gem

Yet another Go assertion library competing directly with testify's established ecosystem.

Strengths
  • String similarity suggestions on failed assertions help spot typos without manual digging.
  • Time comparison with timezone/nanosecond ignore options solves real datetime testing pain.
  • Numeric diff calculations with contextual hints beat generic 'expected vs actual' output.
Weaknesses
  • testify already dominates Go assertions with 20k+ stars and mature ecosystem support.
  • Better error messages alone don't justify switching from established testing workflows.
Target Audience

Go developers writing unit tests

Similar To

testify · assert · gomega

Post Description

A few months ago I posted this here. Since then I've added a bunch of new assertions: BeSorted, BeSameTime, BeWithin, BeError/BeErrorIs/BeErrorAs, formatted custom messages, and some renames for clarity.

The core idea is still the same — when a test fails, you should immediately know why without having to add debug prints.

https://github.com/Kairum-Labs/should

Similar Projects

Attest – Test AI agents with 8-layer graduated assertions

I built Attest because every team I've seen building AI agents ends up writing the same ad-hoc pytest scaffolding — checking if the right tools were called, if

tommathews
103mo ago