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