golang-stretchr-testify
CommunityMaster testify patterns for reliable Go tests.
Authorsamber
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Go developers often struggle to apply testify correctly across assertions, mocks, and suites; this guide consolidates best practices and patterns to write clear, reliable tests.
Core Features & Use Cases
- Assertion patterns: proper use of assert vs require and preserving test flow.
- Mocks and expectations: how to define mocks, set expectations, and verify with AssertExpectations.
- Suite lifecycle: using suite.Suite, SetupTest, and launcher functions.
- Common mistakes & linting: guidance on argument order, error checks, and recommended linters like testifylint.
Quick Start
Begin by applying the assert/must naming pattern and gradually add mocks and test suites to your Go tests.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: golang-stretchr-testify Download link: https://github.com/samber/cc-skills-golang/archive/main.zip#golang-stretchr-testify Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.