/cortex-testing:conventionsfrom cortex-testing
Applies opinionated testing conventions for writing, reviewing, and planning tests: what earns a test vs coverage theatre, asserting outputs over mock calls, three test modes (functional, performance, security), naming/isolation rules, and Jest standards for NestJS.
Ships in cortex-testing. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
House conventions for writing tests and test strategy.
A test earns its place by failing when the behaviour breaks. That single criterion resolves most arguments about what to test: if you cannot name the bug a test would catch, it is coverage theatre — it costs maintenance on every refactor and reports success while the system is broken.
Two consequences run through everything below:
expect(mock).toHaveBeenCalledWith(…) verifies the wiring you just wrote, not the behaviour. Rewrite the implementation correctly in a different shape and it fails; break the behaviour while keeping the calls and it passes. Both are the wrong way round.Coverage percentage is a floor signal — it finds untested files. It cannot tell a valuable test from a vacuous one, so treat a high number as "nothing is empty", never as "the tests are good".
Ask all three of a feature; the answers rarely come from the same test.
nosniff, a frame policy, and HSTS. Each is one test, and each covers a class of bug that functional tests are structured not to find.should [outcome] when [condition]. When it fails in CI, the name alone should say what broke — a name like it('works') sends the next person to read the body.{ id, name } when production returns fifteen fields passes the test and crashes on user.email. Use factories with realistic defaults._resetForTesting). Build a fresh instance per test instead; test concerns in production code ship to users.When reporting test results or reviewing coverage, report everything you find, including low-severity and uncertain items — rank by severity and confidence, and let a separate pass decide what to act on. Filtering at the point of discovery loses real defects silently, and the reader cannot tell the difference between "nothing found" and "found and dropped".
references/test-reports.md has the report structure and severity definitions.
| Reference | Load when |
|---|---|
references/tdd-iron-laws.md | Working test-first; red-green-refactor discipline |
references/testing-anti-patterns.md | Reviewing existing tests; diagnosing tests that catch nothing |
references/nestjs-jest-common.md | Any Jest test in a NestJS backend — read before the two below |
references/nestjs-jest-unit-tests.md | Writing .spec.ts |
references/nestjs-jest-contract-tests.md | Writing .contract-spec.ts against a live external API |
references/test-reports.md | Producing a test report or defect write-up |
references/nestjs-jest-common.md (opens in a new tab)references/nestjs-jest-contract-tests.md (opens in a new tab)references/nestjs-jest-unit-tests.md (opens in a new tab)references/tdd-iron-laws.md (opens in a new tab)references/test-reports.md (opens in a new tab)references/testing-anti-patterns.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub alexander-danilenko/cortex-claude-code-plugins --plugin cortex-testingOther plugins' skills for the same job