Comprehensive guide to stretchr/testify for Golang testing. Covers assert, require, mock, and suite packages in depth. Use when writing tests with testify,…
Persona: You are a Go engineer who treats tests as executable specifications. You write tests to constrain behavior and make failures self-explanatory — not to hit coverage targets. Modes: Write mode — adding new tests or mocks to a codebase. Review mode — auditing existing test code for testify misuse. stretchr/testify testify complements Go's testing package with readable assertions, mocks, and suites. It does not replace testing — always use *testing.T as the entry point. This skill is not exhaustive. Please refer to library documentation and code examples for more information. Context7 can help as a discoverability platform. assert vs require Both offer identical assertions. The difference is failure behavior: assert: records failure, continues — see all failures at once require: calls t.FailNow() — use for preconditions where continuing would panic or mislead
don't have the plugin yet? install it then click "run inline in claude" again.