testing-patterns
Installation
SKILL.md
Designing tests that hold up. Arrange-act-assert, given-when-then, the stub/mock/spy/fake vocabulary, and descriptive naming are assumed; this file carries the decisions that go wrong and the traps in how the runner is wired.
Whether a passing suite proves anything belongs to test-integrity.
Classify by the boundary crossed
Scope ("one function" versus "several components") does not settle the cases teams argue about, since both readings are defensible for the same file. The boundary crossed is decidable: does this test touch a socket, the filesystem, a subprocess, a daemon lifecycle, the program's standard output?
| Layer | Boundary |
|---|---|
| unit | Crosses none: everything runs inside the test process |
| integration | Crosses a real process, network, filesystem, or daemon lifecycle |
| e2e | Crosses the program's outermost entry point: a command invocation, standard output, a browser session |