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