tests-that-matterlisted
Install: claude install-skill yakoshiq/skills
# Tests That Matter
Prove behavior a caller or operator can observe. Green is not confidence.
Match the repo's test runner and style. Do not invent a framework, coverage cult, or TDD ceremony.
## Choose scope
- **Review:** findings only - no rewrite. Weak asserts, mock theater, missing failures/boundaries, false regressions.
- **Write / fix:** add or reshape tests. Touch production only for a real test seam, and say so.
- **New feature work:** when you change invariants or failure paths, update or add the focused cases that prove them.
## Prove
- Public outcomes: return values, raised/returned errors, persisted state, and effects at real external boundaries.
- Distinct failure modes as distinct cases (validation vs not-found vs infra vs partial success). If effect A commits and B fails, assert both the committed state and the failure.
- Invariants and boundaries that can actually break (empty, zero, max, off-by-one, idempotency).
- A regression that fails on the old defect. If it stays green on broken code, it is not a regression test.
## Avoid
- Private helpers, call order inside the unit, and literal structure of the implementation.
- Mocks of implementation details inside the unit. Prefer in-memory fakes for owned stateful collaborators; mock only narrow external or nondeterministic edges (network, clock, disk, queue, payment gateway).
- Asserts that only restate the mock setup (`toHaveBeenCalledWith` with no outcome check).
- Five near-duplicate cases when one tab