(files: Record<string, string>)
| 38 | }); |
| 39 | |
| 40 | const project = (files: Record<string, string>): string => { |
| 41 | const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'cg-dotdot-')); |
| 42 | dirs.push(dir); |
| 43 | for (const [rel, content] of Object.entries(files)) { |
| 44 | fs.mkdirSync(path.dirname(path.join(dir, rel)), { recursive: true }); |
| 45 | fs.writeFileSync(path.join(dir, rel), content); |
| 46 | } |
| 47 | return dir; |
| 48 | }; |
| 49 | |
| 50 | const gitCommitAll = (dir: string): void => { |
| 51 | execFileSync('git', ['init', '-q'], { cwd: dir }); |
no test coverage detected