()
| 92 | |
| 93 | /** Create a temp directory and initialize a git repo in it */ |
| 94 | export async function createTempGitRepo(): Promise<string> { |
| 95 | const dir = await mkdtemp(resolve(tmpdir(), 'bumpy-test-')); |
| 96 | execFileSync('git', ['init'], { cwd: dir, stdio: 'pipe' }); |
| 97 | execFileSync('git', ['commit', '--allow-empty', '-m', 'init'], { cwd: dir, stdio: 'pipe' }); |
| 98 | return dir; |
| 99 | } |
| 100 | |
| 101 | /** Remove a temp directory */ |
| 102 | export async function cleanupTempDir(dir: string): Promise<void> { |
no outgoing calls
no test coverage detected
searching dependent graphs…