(dataDir: string)
| 44 | * the manifest that `executor mcp` reads, so the exact number is not load-bearing. |
| 45 | */ |
| 46 | const startDaemon = (dataDir: string): void => { |
| 47 | const port = 20_000 + Math.floor(Math.random() * 20_000); |
| 48 | const result = spawnSync( |
| 49 | "bun", |
| 50 | ["run", cliEntry, "daemon", "run", "--port", String(port), "--hostname", "127.0.0.1"], |
| 51 | { env: { ...process.env, EXECUTOR_DATA_DIR: dataDir, EXECUTOR_SCOPE_DIR: testScope } }, |
| 52 | ); |
| 53 | expect(result.status, `daemon run failed: ${result.stderr?.toString() ?? ""}`).toBe(0); |
| 54 | }; |
| 55 | |
| 56 | /** Stop the daemon started above; the manifest carries its pid. */ |
| 57 | const stopDaemon = (dataDir: string): Effect.Effect<void> => |
no test coverage detected