← ClaudeAtlas

testinglisted

Testing principles and the pragmatic TDD loop — stack-agnostic and canon-anchored. Use when writing or reviewing tests, deciding what to test and how to name it, choosing between unit/integration/e2e, deciding whether to mock or use the real thing, judging whether coverage is enough, starting a feature test-first, or when tests are flaky, coupled or unreadable — in any language, front or back. It encodes: done means tested, the red-green-refactor loop, the test pyramid, one test file per unit, names as specification, AAA and test independence, classicist test doubles (real collaborators and fakes over mocks), behavior over implementation, and rule coverage over line coverage. Test file placement and tooling are stack-specific and live in each stack's skill.
JorgeCostaMacia/skills · ★ 2 · Testing & QA · score 75
Install: claude install-skill JorgeCostaMacia/skills
# Testing & TDD (principles) Canon-anchored: sections marked **[canon]** state the standard; **[our convention]** marks deliberate positions, each with its why. Where test files live and which framework/tooling to use is each stack skill's decision. **Rules get revised, not forced: if one fights the reality of a project, question the rule.** ## Done means tested — [our convention] A use case, rule, or fix without tests **doesn't exist**. Tests are part of the change — same commit, same PR, same definition of done — never a follow-up task. The one exception: a **thin driving adapter** — one that only unpacks its input and calls a use case, with no rule of its own — may go without a unit test of its own. The composition test proves it is wired, and it is watched in production until it has behaved. Anything holding a rule is tested. ## The loop — [canon: red-green-refactor] 1. **Red** — write the failing test that states the expected behavior. Name it first: if you can't name it, you don't know what you're building yet. 2. **Green** — the simplest code that passes. No gold-plating. 3. **Refactor** — with green tests: names, duplication, structure. Tests are code — they refactor too. **[our convention]** Pragmatics over ritual: an exploratory spike may come first — but the tests are written **before the work is considered done**, and the design is re-checked against them. The non-negotiable is the end state (tested), not the ceremony. ## The test pyramid — [canon] ```