Copilot instructions
.github/instructions/testing.instructions.mdCopilot instructions
Quality
58/100
Scores the file, not the repository.Length
399 words
12 headings · 3 code blocksRepository
453k
— · pushed 0 days agoLast changed
3 days ago
First indexed 3 days ago.12345# Test Coverage Review Instructions67Review code changes for adequate test coverage using freeCodeCamp's testing conventions.89## Testing Framework Reference1011| Location | Framework | File Pattern | Notes |12|----------|-----------|--------------|-------|13| `api/` | Vitest | `*.test.ts` | Co-located with source |14| `client/` | Vitest | `*.test.{ts,tsx}` | Co-located with source |15| `e2e/` | Playwright | `*.spec.ts` | Dedicated directory |1617## When to Flag Missing Tests1819Comment on missing tests if ALL of these are true:2021- PR modifies functional code (bug fix or new feature)22- No corresponding test additions or modifications exist23- Changes are not test-only or config-only2425### Examples Requiring Tests2627- New utility functions in `api/src/utils/` or `client/src/utils/`28- New API route handlers in `api/src/routes/`29- New React components with logic in `client/src/components/`30- Bug fixes that change application behavior31- New validation logic or data transformations3233## When NOT to Flag3435Do not comment on test coverage if:3637- Changes are documentation, configuration, or non-functional38- PR already includes appropriate test coverage39- Changes are to test files themselves40- Changes are trivial:41 - Import reorganization42 - Formatting changes43 - Type-only changes (interfaces, type definitions)44 - Comment updates45- Changes are in areas without existing test patterns:46 - Curriculum markdown files47 - Configuration files48 - Build scripts4950## Detecting Outdated Tests5152Flag if existing tests may be outdated:5354- Test file exists for modified source but doesn't cover the changed functionality55- Test assertions reference behavior that is being changed56- Mock data doesn't reflect new data structures or API responses57- Test descriptions no longer match actual test behavior5859### Example Comment for Outdated Tests6061```62Tests in `src/utils/validate.test.ts` need updates for new validation rules.63```6465## Comment Format6667### Missing Tests6869Brief, actionable feedback only:7071```72Missing tests for `src/utils/validate.ts`:73- Valid input case74- Invalid input error75- Empty string edge case76```7778### Sufficient Coverage7980**DO NOT COMMENT.** Silence means approval.8182### Outdated Tests8384```85Tests in `[test file]` need updates for `[source file]` changes:86- [specific change]87```8889## Test Quality Indicators9091When tests are present, briefly verify:9293- Tests cover the happy path94- Tests cover at least one error/edge case95- Test descriptions are meaningful (not just "test 1", "test 2")96- Mocks are appropriate (not mocking the thing being tested)9798Do not block PRs for test style preferences if coverage is adequate.99
Also in freeCodeCamp/freeCodeCamp
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| freeCodeCamp/freeCodeCamp.github/copilot-instructions.md · 453k | Copilot instructions | testlint-formatstylearch+4 | 76/100 | 3 days ago |
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| chihebnabil/lovable-boilerplate.github/instructions/global.instructions.md · 63 | Copilot instructions | buildlint-formatstylearch+4 | 100/100 | 3 days ago | |
| HerringtonDarkholme/megarepo.github/copilot-instructions.md · 17 | Copilot instructions | setupbuildtestlint-format+7 | 100/100 | 3 days ago | |
| louislam/uptime-kuma.github/copilot-instructions.md · 90k | Copilot instructions | setupbuildtestlint-format+9 | 100/100 | 3 days ago | |
| JCodesMore/ai-website-cloner-template.github/copilot-instructions.md · 31k | Copilot instructions | buildlint-formatstylearch+3 | 97/100 | 2 days ago | |
| bagisto/bagisto.github/copilot-instructions.md · 28k | Copilot instructions | setupbuildteststyle+5 | 97/100 | 3 days ago | |
| darkmatter/nixmac.github/copilot-instructions.md · 24 | Copilot instructions | setupbuildtestlint-format+8 | 96/100 | 3 days ago | |
| nerolis-lab/nerolis-lab.github/copilot-instructions.md · 32 | Copilot instructions | setupbuildtestlint-format+11 | 96/100 | 3 days ago | |
| thangaram611/second-brain.github/copilot-instructions.md · 0 | Copilot instructions | setupteststylearch+4 | 96/100 | 3 days ago |
