test-isolation-baselisted
Install: claude install-skill ecoma-io/touchstone
# Test Isolation Principles
A test earns its place by failing when the behaviour breaks. Before writing a single assertion, name the regression: "which specific change to this code must turn this test red?" If the honest answer is "nothing I can name," stop.
The default test double is a hand-written stub or fake. A mocking framework earns its keep only when the interface is wide enough that writing the double by hand is real work.
The tiers are not a ladder of quality. A behaviour tested at the wrong tier is worse than one tested at the right one, in both directions: an integration test standing in for a unit test buries the cause; a unit test standing in for an integration test pins a contract nobody actually holds.
## Related decisions
This skill states the principles. Four peer skills own the specific decisions:
- [test-boundary](../test-boundary/SKILL.md) — unit vs integration, packaging tiers
- [test-double-type](../test-double-type/SKILL.md) — stub, fake, spy, mock
- [test-third-party](../test-third-party/SKILL.md) — never substitute, inject boundary
- [test-nondeterminism](../test-nondeterminism/SKILL.md) — clocks, random, fs, media features
Per-language mechanics: [TypeScript](references/typescript.md)