Skip to content

Commit 4e99801

Browse files
committed
test: configure git before initializing a new repo in tests
1 parent 0bb00ca commit 4e99801

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/fixtures/test-repository.fixture.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ export default class TestRepositoryFixture {
4141
rmSync(this.location, { recursive: true });
4242
}
4343
mkdirSync(this.location);
44+
execSync(`git config --global user.email "contact@example.com"`);
45+
execSync(`git config --global user.name "John Doe"`);
46+
execSync(`git config --global init.defaultBranch main`);
4447
execSync(`git -C ${this.location} init`);
4548

4649
this.#files.forEach((file) => {

0 commit comments

Comments
 (0)