# Shared Test Patterns

- One fixture per scenario under `tests/fixtures/{name}/`
- `describe(...)` + `it(...)` from `node:test`
- Co-locate tests with their implementation as `*.test.mjs`
- Prefer table-driven tests for permutations
- Reset module-level state in `beforeEach` to keep tests isolated
- Use `execFile` for CLI subprocess tests
- Avoid mocks for I/O at fixture boundaries — read real files instead
