414 B
414 B
Shared Test Patterns
- One fixture per scenario under
tests/fixtures/{name}/ describe(...)+it(...)fromnode:test- Co-locate tests with their implementation as
*.test.mjs - Prefer table-driven tests for permutations
- Reset module-level state in
beforeEachto keep tests isolated - Use
execFilefor CLI subprocess tests - Avoid mocks for I/O at fixture boundaries — read real files instead