tests
Tests
Review test adequacy for changed code.
Scope
1. Coverage gaps
- new exported functions or modules without tests
- new branches or error paths without coverage
- changed behavior that existing tests do not exercise
2. Edge cases
- boundary conditions (empty inputs, missing files, null/undefined)
- error recovery paths (command not found, parse failures)
- configuration variants the code handles
3. Test quality
- tests asserting implementation details instead of behavior (method call sequences break on refactor)
- tests duplicating coverage without distinct scenarios
- fragile tests (timing, ordering, absolute paths)
- missing cleanup (temp files, cache state)
- mocking internals instead of testing through the real contract — mock at boundaries only
- test names that don't read as specifications
4. Unnecessary tests
- tests covering trivial pass-through or type-only modules
- tests duplicating what the type system guarantees
- tests for code that has since changed
Evidence threshold
Only flag gaps where untested code has meaningful behavior. Do not demand 100% coverage — prioritize tests that catch real bugs.
Output
For each finding: severity, source file + test file, what is untested, why it matters, fix direction.
Then: Must-add | Should-add | Optional | Remove (if any).
See also
tddfor implementation-time test disciplinereviewfor multi-axis merge decisionsreferences/testing-patterns.mdfor concrete coverage and quality checks
Red flags
- Demanding 100% line coverage
- Flagging missing tests for trivial functions
- Suggesting tests that only verify the type system
- Broad test rewrites instead of targeted additions
- Confusing test quantity with quality
More from cniska/skills
tdd
Drive implementation with red-green-refactor. Use when building features or fixing bugs test-first.
11explore
Explore a task or design through systematic questions until reaching shared understanding. Use before implementing complex or ambiguous work.
9issue
Create a GitHub issue from a short description. Use when filing a bug, feature request, or task.
9pr
Create a pull request with review and verify. Use when the branch is ready to merge.
9test-audit
Audit test coverage, quality, and missing edge cases. Use when reviewing whether changed code has adequate tests.
5security-audit
Audit security risks, trust boundaries, and unsafe defaults. Use when reviewing security posture or assessing risk before release.
5