Skip to content

Commit 6d32093

Browse files
Copilothotlong
andcommitted
refactor: Set coverage thresholds closer to current levels
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent ba65bac commit 6d32093

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

CONTRIBUTING.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ describe('MyComponent', () => {
182182
- Write tests for all new features
183183
- Test user interactions, not implementation details
184184
- Use meaningful test descriptions
185-
- Maintain or improve code coverage (current thresholds: 60% lines, 40% functions, 35% branches, 60% statements)
185+
- Maintain or improve code coverage (current thresholds: 63% lines, 43% functions, 40% branches, 62% statements)
186186
- Aim to gradually increase coverage toward the long-term goal of 80%+ across all metrics
187187
- Test edge cases and error states
188188

@@ -378,12 +378,12 @@ Our repository includes several automated GitHub workflows that will run when yo
378378

379379
##### Test Coverage Requirements
380380
The project enforces minimum test coverage thresholds to maintain code quality:
381-
- **Lines**: 60% (target: gradually increase to 80%)
382-
- **Functions**: 40% (target: gradually increase to 80%)
383-
- **Branches**: 35% (target: gradually increase to 75%)
384-
- **Statements**: 60% (target: gradually increase to 80%)
381+
- **Lines**: 63% (target: gradually increase to 80%)
382+
- **Functions**: 43% (target: gradually increase to 80%)
383+
- **Branches**: 40% (target: gradually increase to 75%)
384+
- **Statements**: 62% (target: gradually increase to 80%)
385385

386-
These thresholds are intentionally set below our long-term goals to prevent CI failures while we improve test coverage. New code should aim for higher coverage than these minimums.
386+
These thresholds are intentionally set just below current coverage levels to prevent CI failures from minor fluctuations while we improve test coverage. New code should aim for higher coverage than these minimums.
387387

388388
#### Security Scans
389389
- **CodeQL**: Scans for security vulnerabilities in code

vitest.config.mts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ export default defineConfig({
2727
// Adjusted to reflect current coverage levels and prevent CI failures
2828
// Target: Gradually increase these as test coverage improves
2929
thresholds: {
30-
lines: 60,
31-
functions: 40,
32-
branches: 35,
33-
statements: 60,
30+
lines: 63,
31+
functions: 43,
32+
branches: 40,
33+
statements: 62,
3434
},
3535
},
3636
},

0 commit comments

Comments
 (0)