golang-stretchr-testify
Comprehensive guide to stretchr/testify for Golang testing. Covers assert, require, mock, and suite packages in depth. Use when writing tests with testify, creating mocks, setting up test suites, or choosing between assert and require. Covers testify assertions, mock expectations, argument matchers, call verification, suite lifecycle, and advanced patterns like Eventually, JSONEq, and custom matchers. Apply when the…
- installs 8w
- 4,306
- 30-day movement
- starts with the next reading
- Related entries
- 1
- Connections
- 0
An agent skill (SKILL.md) that documents the stretchr/testify testing library for Go, covering the assert, require, mock, and suite packages. It bundles a mock reference and includes examples and pitfalls sections, with notes on argument order, AssertExpectations, and testifylint.
Reach for it when your Go codebase imports github.com/stretchr/testify and you need guidance on assertions, mocks, or suites while writing tests.
Use it to
- Choose between assert and require
- Create mocks with mock.Mock and verify expectations
- Set up test suites with shared setup/teardown
- Use advanced assertions like Eventually and JSONEq
- Avoid common testify mistakes
For Go developers writing tests with testify in Claude Code or similar agents
- Host repository
- samber/cc-skills-golang
- Version
- 1.3.1
- Installs, lifetime
- 38k
- Installs, 8 weeks
- 4,306
- Compatible with
- Designed for Claude Code, Codex or similar harness, and for projects using Golang.
- Licence
- MIT
- Invocable by
- user
- Host stars
- 3,292
- Host language
- Go