(args: string[], env: Record<string, string> = {})
| 27 | } |
| 28 | |
| 29 | function runScript(args: string[], env: Record<string, string> = {}): { stdout: string; stderr: string; exitCode: number } { |
| 30 | const result = spawnSync("bun", [SCRIPT, ...args], { |
| 31 | encoding: "utf-8", |
| 32 | timeout: 60000, |
| 33 | env: { ...process.env, ...env }, |
| 34 | }); |
| 35 | return { |
| 36 | stdout: result.stdout || "", |
| 37 | stderr: result.stderr || "", |
| 38 | exitCode: result.status ?? 1, |
| 39 | }; |
| 40 | } |
| 41 | |
| 42 | describe("gstack-gbrain-sync CLI", () => { |
| 43 | it("--help exits 0 with usage text", () => { |
no test coverage detected