.opencode/commands/test-coverage.md
Analyze test coverage and identify gaps: $ARGUMENTS
npm test -- --coverage| Code Type | Target |
|---|---|
| Standard code | 80% |
| Financial logic | 100% |
| Auth/security | 100% |
| Utilities | 90% |
| UI components | 70% |
File | % Stmts | % Branch | % Funcs | % Lines
---------------|---------|----------|---------|--------
All files | XX | XX | XX | XX
[Files below target, prioritized by criticality]
[Specific lines that need tests]
For each uncovered area:
Location: src/path/file.ts:123
Coverage Gap: [description]
Suggested Tests:
describe('functionName', () => {
it('should [expected behavior]', () => {
// Test code
})
it('should handle [edge case]', () => {
// Edge case test
})
})
Critical (add immediately)
High (add this sprint)
Medium (add when touching file)
IMPORTANT: Coverage is a metric, not a goal. Focus on meaningful tests, not just hitting numbers.