Individual skill
conventions
Apply these opinionated testing conventions whenever writing, reviewing, or planning tests: what earns a test and what is coverage theatre, asserting outputs rather than mock calls, the three modes (functional, performance, security), naming and isolation rules, where to mock, and reporting findings for coverage rather than self-filtering. Includes house Jest standards for NestJS unit and contract tests, TDD discipline, and test-report structure.
plugins/engineering/cortex-testing/skills/conventions/SKILL.md
Source commit 8e809de409ce0c6539f0e31e821196efc4d7c7c9
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- Yes
- Observed behavior
- Instructions only
- Last checked
- Nov 5, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 18
- Repository last updated
- Oct 23, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- ai-skill Repository topic
- ai-skills Repository topic
- claude-code Repository topic
- claude-code-skill Repository topic
- claude-code-skills Repository topic
- cursor Repository topic
- cursor-skill Repository topic
- cursor-skills Repository topic
- opencode-skill Repository topic
- opencode-skills Repository topic
- testing Derived category
- legal Derived category
- writing Derived category
- security Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 5,573 bytesreferences/nestjs-jest-common.mddoc · 8,071 bytesreferences/nestjs-jest-contract-tests.mddoc · 5,632 bytesreferences/nestjs-jest-unit-tests.mddoc · 6,923 bytesreferences/tdd-iron-laws.mddoc · 2,376 bytesreferences/test-reports.mddoc · 1,770 bytesreferences/testing-anti-patterns.mddoc · 2,134 bytes
Read excerpt
# Testing
House conventions for writing tests and test strategy.
## What a test is for
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:
- **Assert on outputs — return values, thrown errors, persisted state.** A test whose only assertion is `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.
- **Test decisions, not lines.** Branches, error translation, state transitions, boundary conditions. A pass-through delegator or a field mapping with no conditional has nothing to get wrong, and a test for it only breaks when someone renames a method.
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".