(cwd: string)
| 31 | }; |
| 32 | |
| 33 | export const createGit = async (cwd: string) => { |
| 34 | const git = (command: string, args?: string[], options?: Options) => |
| 35 | execa('git', [command, ...(args || [])], { |
| 36 | cwd, |
| 37 | ...options, |
| 38 | }); |
| 39 | |
| 40 | await git('init', [ |
| 41 | // In case of different default branch name |
| 42 | '--initial-branch=master', |
| 43 | ]); |
| 44 | |
| 45 | await git('config', ['user.name', 'name']); |
| 46 | await git('config', ['user.email', 'email']); |
| 47 | |
| 48 | return git; |
| 49 | }; |
| 50 | |
| 51 | export const createFixture = async (source?: string | FileTree) => { |
| 52 | const fixture = await createFixtureBase(source); |
no test coverage detected