(args: string[])
| 12 | |
| 13 | /** Runs a Git command in the temporary repo directory. */ |
| 14 | export function runGitInTmpDir(args: string[]): string { |
| 15 | const result = spawnSync(process.env['GIT_BIN']!, args, {cwd: testTmpDir, encoding: 'utf8'}); |
| 16 | if (result.status !== 0) { |
| 17 | throw Error(`Error for Git command: ${result.stdout} ${result.stderr}`); |
| 18 | } |
| 19 | return result.stdout.trim(); |
| 20 | } |
| 21 | |
| 22 | /** Helper class that can be used to initialize and control the sandbox test repo. */ |
| 23 | export class SandboxGitRepo { |
no test coverage detected