| 11 | // ─── Helpers ───────────────────────────────────────────────────────────────── |
| 12 | |
| 13 | function makeState(opts = {}) { |
| 14 | const stateFile = path.join(os.tmpdir(), `tdd_test_${Math.random().toString(36).slice(2)}.json`); |
| 15 | return new TDDStateMachine({ workdir: os.tmpdir(), stateFile, ...opts }); |
| 16 | } |
| 17 | |
| 18 | const PASSING_RESULT = { passed: 2, failed: 0, errors: 0, skipped: 0, exitCode: 0, failures: [] }; |
| 19 | const FAILING_RESULT = { passed: 0, failed: 1, errors: 0, skipped: 0, exitCode: 1, failures: [{ name: 'test_foo', message: 'AssertionError' }] }; |