test-unit
Installation
SKILL.md
Unit Tests
Write unit tests for individual functions, methods, and classes in isolation.
Test Creation Checklist
Function/Method Isolation
- Identify all external dependencies to mock or stub
- Ensure each test exercises exactly one unit of behavior
- Verify test independence (no shared mutable state between tests)
- Check that setup/teardown properly resets test context
- Confirm no reliance on execution order
Assertion Completeness
- Assert return values for all meaningful inputs
- Verify state changes on mutable objects after method calls
- Check that expected exceptions are thrown with correct types and messages
- Assert side effects (method calls on collaborators, events emitted)
- Validate output structure, not just existence