-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Description
Configure Jest coverage thresholds to ensure code quality standards are maintained and provide a "soft gate" for future development.
Work Required
- Update Jest Config: Modify
jest.config.jsto addcoverageThresholdconfiguration - Set Initial Thresholds: Configure reasonable thresholds based on current coverage levels
- Test Configuration: Verify thresholds work correctly and fail builds appropriately
- Document Process: Add comments explaining threshold rationale
Implementation Details
Current coverage status (~39% statements according to TODO.md):
- Set initial thresholds that won't break current builds
- Configure global thresholds as a starting point for improvement
- Make thresholds adjustable as coverage improves over time
Proposed Thresholds
coverageThreshold: {
global: {
statements: 60,
branches: 50,
functions: 55,
lines: 60
}
}Considerations
- Should be achievable with current test improvements in the pipeline
- Can be gradually increased as more tests are added
- Should fail build when thresholds are not met
- Consider per-file thresholds for critical modules later
Files to Modify
jest.config.js- Add coverageThreshold configuration
Testing
- Run
npm testto verify thresholds work - Temporarily lower thresholds to test failure behavior
- Ensure coverage reports show threshold status
Acceptance Criteria
- Build fails if coverage thresholds are not met
- Thresholds are reasonable for current codebase state
- Configuration is properly documented with rationale
- Coverage reports show threshold status clearly
- Thresholds can be gradually increased as coverage improves
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels