( args: string[], stdin: string, )
| 10 | const BIN = path.resolve(import.meta.dir, "..", "bin", "gstack-redact"); |
| 11 | |
| 12 | function run( |
| 13 | args: string[], |
| 14 | stdin: string, |
| 15 | ): { code: number; stdout: string; stderr: string } { |
| 16 | const proc = Bun.spawnSync(["bun", BIN, ...args], { |
| 17 | stdin: Buffer.from(stdin), |
| 18 | }); |
| 19 | return { |
| 20 | code: proc.exitCode, |
| 21 | stdout: proc.stdout.toString(), |
| 22 | stderr: proc.stderr.toString(), |
| 23 | }; |
| 24 | } |
| 25 | |
| 26 | describe("gstack-redact exit codes", () => { |
| 27 | test("clean → 0", () => { |
no outgoing calls
no test coverage detected