Skip to content

Commit ba65bac

Browse files
Copilothotlong
andcommitted
docs: Update coverage threshold documentation in CONTRIBUTING.md
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent aca74ed commit ba65bac

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

CONTRIBUTING.md

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

188189
## Code Style
@@ -373,6 +374,16 @@ Our repository includes several automated GitHub workflows that will run when yo
373374
- **Tests**: Runs unit and integration tests
374375
- **Build**: Ensures all packages build successfully
375376
- **Matrix Testing**: Tests on Node.js 18.x and 20.x
377+
- **Coverage Thresholds**: Enforces minimum test coverage (see below)
378+
379+
##### Test Coverage Requirements
380+
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%)
385+
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.
376387

377388
#### Security Scans
378389
- **CodeQL**: Scans for security vulnerabilities in code

0 commit comments

Comments
 (0)