writing-good-tests
Installation
SKILL.md
Writing Good Tests
Philosophy
"Write tests. Not too many. Mostly integration." — Kent C. Dodds
Tests verify real behavior, not implementation details. The goal is confidence that your code works, not coverage numbers.
Core principles:
- Test behavior, not implementation — refactoring shouldn't break tests
- Integration tests provide better confidence-to-cost ratio than unit tests
- Wait for actual conditions, not arbitrary timeouts
- Mock strategically — real dependencies when feasible, mocks for external systems
- Don't pollute production code with test-only methods
Test Structure
Use Arrange-Act-Assert (or Given-When-Then):