(dir: string, base: string)
| 8937 | let tempDir: string; |
| 8938 | // Helper: make a self-contained git repo at `dir` with one committed TS file. |
| 8939 | const makeRepo = async (dir: string, base: string) => { |
| 8940 | const { execFileSync } = await import('child_process'); |
| 8941 | const git = (...args: string[]) => execFileSync('git', args, { cwd: dir, stdio: 'pipe' }); |
| 8942 | fs.mkdirSync(dir, { recursive: true }); |
| 8943 | git('init', '-q'); |
| 8944 | git('config', 'user.email', 'test@test.com'); |
| 8945 | git('config', 'user.name', 'Test'); |
| 8946 | fs.writeFileSync(path.join(dir, `${base}.ts`), `export const ${base} = 1;`); |
| 8947 | git('add', '-A'); |
| 8948 | git('commit', '-q', '-m', `${base} init`); |
| 8949 | }; |
| 8950 | |
| 8951 | beforeEach(() => { |
| 8952 | tempDir = createTempDir(); |
no test coverage detected