testing-strategylisted
Install: claude install-skill zakariaf/CatchLaw
# Testing Strategy
Tests are the only correctness instrument you control at build time: shape the suite
to the code, not to a decades-old ratio, and make each test assert behaviour a build
either passes or fails. Applies to every test under `test/` and `integration_test/`.
Read the reference for the task at hand:
- `references/test-layers.md` — per-layer harness, imports, teardown, edge tables (pure core, in-memory Drift, headless Notifier, integration).
- `references/property-and-fakes.md` — fakes-over-mocks, enum-driven fake state, seeded fuzz, independent oracles, absence-of-a-failure-class tests.
- `references/coverage-and-budget.md` — file-level floors, the coverage-lies-upward fix, the suite-time budget, and the manual-pass handoff.
Run `scripts/check_test_hygiene.sh` and `scripts/run_tests.sh` before a PR.
Golden, RTL, and a11y widget mechanics live in `widget-golden-and-a11y-testing`; this
skill governs everything below the pixel.
## Non-negotiable rules
1. **Shape the suite to the code, not the pyramid.** The 70/20/10 numbers trace to a
2011 test-*size* heuristic (its author said they were "pulled out of a hat") and
never described Flutter's unit/widget/integration taxonomy. Test at the **cheapest
tier that can assert the behaviour**: anything expressible as `f(input) -> output`
is a unit or property test, never a `pumpWidget`. Driving pure logic through the
widget tree is slower, flakier, and hides which layer broke.
2. **Put business rules in a