Testing
SKILL.md
Golang Testing Standards
Priority: P0 (CRITICAL)
Principles
Guidelines
TDD Workflow
- Red: Write a failing table-driven test case.
- Green: Implement logic to pass.
- Refactor: Simplify code.
Golden Snippet
See Table-Driven Tests for full template.
Tools
- Stdlib:
testingpackage is usually enough. - Testify (
stretchr/testify): Assertions (assert,require) and Mocks. - Mockery: Auto-generate mocks for interfaces.
- GoMock: Another popular mocking framework.
Naming
- Test file:
*_test.go - Test function:
func TestName(t *testing.T) - Example function:
func ExampleName()
Anti-Patterns
- Sleeping in tests: Use channels/waitgroups or retry logic.
- Testing implementation details: Test public behavior/interface.
References
Weekly Installs
11
Repository
mte90/dotfilesGitHub Stars
45
First Seen
Feb 28, 2026
Security Audits
Installed on
opencode11
gemini-cli11
claude-code11
github-copilot11
codex11
kimi-cli11