config-audit/tests/fixtures/marketplace-large/.claude/shared-tests.md

9 lines
414 B
Markdown

# 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