(args: string[], extraEnv: Record<string, string> = {})
| 31 | }; |
| 32 | |
| 33 | function runConfig(args: string[], extraEnv: Record<string, string> = {}): { stdout: string; status: number; stderr: string } { |
| 34 | const result = spawnSync(CONFIG_BIN, args, { |
| 35 | encoding: 'utf-8', |
| 36 | env: { |
| 37 | ...process.env, |
| 38 | ...extraEnv, |
| 39 | }, |
| 40 | timeout: 5000, |
| 41 | }); |
| 42 | return { stdout: result.stdout || '', status: result.status ?? -1, stderr: result.stderr || '' }; |
| 43 | } |
| 44 | |
| 45 | beforeEach(() => { |
| 46 | TMP_HOME = mkdtempSync(join(tmpdir(), 'gstack-user-slug-test-')); |
no test coverage detected