Skip to content

Commit 17cf755

Browse files
committed
Document mandatory coverage requirements in CLAUDE.md
1 parent b33a750 commit 17cf755

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ Programmatic access to Socket.dev's security analysis capabilities.
7575
- **Test single file**: ✅ CORRECT: `pnpm test path/to/file.test.ts`
7676
- ❌ WRONG: `pnpm test -- path/to/file.test.ts`
7777
- **Update snapshots**: `pnpm test -u`
78+
- **🚨 MANDATORY Coverage Requirements**: Before pushing commits, ensure test coverage is maintained or improved
79+
- **Never decrease coverage**: All changes MUST maintain or increase existing coverage percentages
80+
- **Check before push**: Run `pnpm run test` to verify coverage thresholds are met
81+
- **Fix coverage drops**: If coverage decreases, add tests to restore or improve coverage before pushing
82+
- **Rationale**: Declining coverage indicates untested code paths, which increases risk of bugs and regressions
7883

7984
### Test Naming Standards (Critical for Coverage)
8085
- **File names**: Use descriptive, specific names

0 commit comments

Comments
 (0)