Skip to content

Commit d2577e5

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

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
@@ -42,6 +42,9 @@ export default class TestRepositoryFixture {
4242
}
4343
mkdirSync(this.location);
4444
execSync(`git -C ${this.location} init`);
45+
execSync(`git config user.email "contact@example.com"`);
46+
execSync(`git config user.name "John Doe"`);
47+
execSync(`git config init.defaultBranch main`);
4548

4649
this.#files.forEach((file) => {
4750
new VersionedFileFixture(this.location)

0 commit comments

Comments
 (0)