testing
Skill4 starsChanged 7 months agoMITView on GitHub
Test philosophy, coverage strategy, test-first patterns, what to test and what not to
123 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- timmo001/skillstheir own version, first seen Oct 5, 2026
- kortix-ai/sunatheir own version, first seen Oct 5, 2026
- gilsmt/skillstheir own version, first seen Oct 4, 2026
- andeeplus/aplustheir own version, first seen Oct 4, 2026
- JetBrains/intellij-communitytheir own version, first seen Oct 3, 2026
- shinpr/codex-workflowstheir own version, first seen Oct 2, 2026
Used with
Projects with it also use oss-pr, pr-automation and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
CES-LtdSkilloss-pr
Use when creating a pull request, after committing changes, or when user invokes /oss-pr. Covers branch management, quality checks, commit, push, and PR creation.
Also in 3 projects that use this
CES-LtdSkillpr-automation
PR Automation Orchestrator: poll open PRs, check CI, run review, fix, and merge eligible PRs. Use when: (1) Invoked by daemon via scripts/pr-automation.sh, (2) User says "/pr-automation".
Also in 3 projects that use this
ffsshhttiikkSkillcicd
Continuous integration and delivery pipelines
Also in 4 projects that use this
ffsshhttiikkSkillnetworking
Practical application and coding skills for Networking
Also in 3 projects that use this
JohnJBorenSkillci-cd
CI/CD pipeline design, GitHub Actions, testing automation, and deployment strategies
Also in 9 projects that use this
Cogni-AI-OUSkilldotfiles
Reference for repository dotfiles, including their purposes, standard configurations, and usage guidelines. You MUST load this skill when configuring, troubleshooting, or understanding repository dotfiles.
Also in 3 projects that use this
- +2 more from CES-Ltd
- +1 more from ffsshhttiikk
Other versions123 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- sefaertunc/anthropic-watch★ 1100% same
Wrote their own version · 122
- lobehub/lobehub★ 83ksame name
- iOfficeAI/AionUi★ 33ksame name
- JetBrains/intellij-community★ 21ksame name
- kortix-ai/suna★ 20ksame name
- modelcontextprotocol/inspector★ 11ksame name
- microsoft/fast★ 9.7ksame name
- bytebase/dbhub★ 3.6ksame name
- theopenco/llmgateway★ 1.7ksame name
- BankrBot/skills★ 1.2ksame name
- microsoft/CCF★ 875same name
112 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository18 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-routingSkill
- backend-conventionsSkill
- claude-md-maintenanceSkill
- coding-principlesSkill
- context-managementSkill
- coordinator-modeSkill
- frontend-design-systemSkill
- git-conventionsSkill
- memory-architectureSkill
- planning-with-filesSkill
- project-patternsSkill
- prompt-engineeringSkill
- review-and-handoffSkill
- security-checklistSkill
- subagent-usageSkill
- verificationSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. 0 are common, 13 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 105 edited versions we read keep these.
13
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Test behavior, not implementation.
- Distinctive: line 43
Every function has these potential edge cases.
- Distinctive: line 69
When doing test-first: write the test, watch it fail, implement the minimum to pass, then refactor.
- Distinctive: line 87
Keep tests independent. No test should depend on another test running first.
- Distinctive: line 88
No shared mutable state between tests.
- Distinctive: line 92
Test names should read like specifications:
- Distinctive: line 105
Use sparingly and review snapshot diffs carefully.
- Distinctive: line 106
Mock everything: if your test mocks 5 dependencies, you're testing the mocking framework, not your code.
- Distinctive: line 108
Test the framework: don't test that Express routes requests or that React renders components.
- Distinctive: line 112
Slow tests without reason: if a test takes seconds, it's probably doing I/O that should be mocked or it's an integration test that should …
- Distinctive: line 119
Test data should be self-contained.
- Distinctive: line 121
When a test fails, the test might be wrong.
- Distinctive: line 123
Delete tests that test deleted features.
“Common” is measured: kept by at least 6 in 10 of the 105 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Testing
What to Test
Test behavior, not implementation. A test should verify what a function does, not how it does it. If you refactor the internals and the test breaks, the test was testing the wrong thing.
Good test: "given a valid email, returns true" Bad test: "calls regex.match with pattern /^[a-z].../"
Meaningful Coverage vs Line Coverage
100% line coverage is a vanity metric. You can have 100% coverage and still ship bugs if your tests don't exercise meaningful paths.
Focus coverage on:
- Business logic (the rules that make your app unique)
- Error handling paths (what happens when things go wrong)
- Boundary conditions (empty, null, max values, off-by-one)
- Integration points (where your code meets external systems)
Skip coverage on:
- Simple getters/setters
- Framework boilerplate
- Generated code
- Pure delegation (functions that just call another function)
Edge Cases Worth Testing
Every function has these potential edge cases. Consider which apply:
- Null / undefined / empty string
- Empty array / empty object
- Single element
- Very large input
- Negative numbers / zero
- Unicode and special characters
- Concurrent access
- Network timeout / failure
You don't need to test ALL of these for every function. Think about which ones are realistic for your specific case.
Test-First Workflow
Writing tests first helps when:
- The behavior is well-defined but the implementation isn't clear
- You're fixing a bug (write the failing test first, then fix)
- You're implementing a spec (tests become the spec's executable form)
Test-first hurts when:
- You're exploring and don't know what the API should look like
- You're prototyping and will throw the code away
- The test would be trivial (testing that a constant equals itself)
When doing test-first: write the test, watch it fail, implement the minimum to pass, then refactor. Don't write all the tests up front — go one at a time.
Test Structure
Follow Arrange-Act-Assert (AAA):
// Arrange: set up the test conditions
const input = createValidInput();
// Act: call the thing being tested
const result = processInput(input);
// Assert: verify the outcome
expect(result.status).toBe('success');Keep tests independent. No test should depend on another test running first. No shared mutable state between tests.
Naming Tests
Test names should read like specifications:
- "should return 401 when token is expired"
- "should merge arrays without duplicates"
- "should create backup directory if it doesn't exist"
Not:
- "test1"
- "it works"
- "handles edge case"
Testing Anti-Patterns
- Snapshot abuse: snapshots test that output didn't change, not that it's correct. Use sparingly and review snapshot diffs carefully.
- Mock everything: if your test mocks 5 dependencies, you're testing the mocking framework, not your code. Prefer integration tests for heavily-connected code.
- Test the framework: don't test that Express routes requests or that React renders components. Trust the framework; test YOUR logic.
- Brittle assertions: asserting on exact error messages or full object shapes when only one field matters. Assert on what matters.
- Slow tests without reason: if a test takes seconds, it's probably doing I/O that should be mocked or it's an integration test that should be tagged separately.
Gotchas
- Flaky tests are worse than no tests. They erode trust in the entire suite. Fix immediately or quarantine with a clear TODO.
- Test data should be self-contained. Don't rely on database state, external services, or file system artifacts from other tests.
- When a test fails, the test might be wrong. Don't assume the code is broken — read the test carefully first.
- Delete tests that test deleted features. Orphan tests confuse and mislead.
- Async tests need proper awaiting. An unawaited assertion silently passes.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

