Problem
No test coverage metrics despite having 689 tests. Can't verify quality or catch coverage regressions.
Current state:
@vitest/coverage-v8 installed as devDependency
- No coverage configuration in
vitest.config.ts
- No coverage reports generated
- No CI gates for coverage thresholds
Risk
- New code may lack tests
- Coverage could regress without notice
- Can't demonstrate quality to enterprise customers
Solution
Enable coverage reporting with minimum thresholds.
// vitest.config.ts
export default defineConfig({
test: {
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
exclude: ['node_modules', 'dist', '**/*.test.ts'],
thresholds: {
statements: 80,
branches: 75,
functions: 80,
lines: 80,
},
},
},
});
Tasks
Proposed Thresholds
| Metric |
Minimum |
Target |
| Statements |
80% |
90% |
| Branches |
75% |
85% |
| Functions |
80% |
90% |
| Lines |
80% |
90% |
Acceptance Criteria
Priority: P1 — Required for enterprise credibility
Problem
No test coverage metrics despite having 689 tests. Can't verify quality or catch coverage regressions.
Current state:
@vitest/coverage-v8installed as devDependencyvitest.config.tsRisk
Solution
Enable coverage reporting with minimum thresholds.
Tasks
vitest.config.tsnpm run test:coveragescriptProposed Thresholds
Acceptance Criteria
npm run test:coveragegenerates HTML reportPriority: P1 — Required for enterprise credibility