(result: Awaited<ReturnType<typeof runCLI>>)
| 27 | } |
| 28 | |
| 29 | function expectJsonOnlyOutput(result: Awaited<ReturnType<typeof runCLI>>) { |
| 30 | expect(result.exitCode).toBe(0); |
| 31 | expect(result.stderr).toBe(''); |
| 32 | expect(() => JSON.parse(result.stdout)).not.toThrow(); |
| 33 | } |
| 34 | |
| 35 | afterAll(async () => { |
| 36 | await Promise.all(tempRoots.map((dir) => fs.rm(dir, { recursive: true, force: true }))); |