unit-testing
Installation
SKILL.md
Unit Testing Skill
Write comprehensive unit tests with full coverage: happy paths, edge cases, and error conditions.
Core Principles
- Test behavior, not implementation - Tests verify what code does, not how
- One assertion concept per test - Each test validates a single logical behavior
- Arrange-Act-Assert structure - Setup, execute, verify
- Descriptive test names - Name describes scenario and expected outcome
- Independent tests - No test depends on another's state or execution order
- Fast tests - Mock expensive operations (network, disk, databases) unless integration testing
Workflow
0. MANDATORY: Use context7 Before Writing Tests
CRITICAL: Before writing ANY tests, use context7 to look up current testing framework documentation and best practices.