What problem does it solve?
This skill eliminates inconsistent testing practices and flaky test suites by enforcing a rigorous, behavior-driven standard for Go unit testing that prioritizes maintainability and resistance to refactoring.
Core Features & Use Cases
- Complexity-Based Strategy: Provides a clear heuristic for determining when to write a unit test versus an integration test based on domain complexity and collaborator count.
- Canonical Patterns: Defines the standard for table-driven tests, mocking philosophy (classical school), and assertion styles to ensure uniform code quality across the repository.
- Use Case: A developer uses this skill to structure a new domain model test suite, ensuring that all invariants are covered by table-driven cases and that dependencies are correctly handled via fakes or mocks.
Quick Start
Use the go-unit-test skill to generate a table-driven test file for the current domain model package following the repository standard.