Skip to content

Commit

Permalink
chore: set git user email and name in all tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys authored and wraithgar committed Feb 15, 2022
1 parent 1cee189 commit acdfab9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/clone.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ t.test('setup aditional tests', t => {
const git = (...cmd) => spawnGit(cmd, { cwd: regularRepo })
const write = (f, c) => fs.writeFileSync(`${regularRepo}/${f}`, c)
return git('init', '-b', 'main')
.then(() => git('config', 'user.name', 'pacotedev'))
.then(() => git('config', 'user.email', 'i+pacotedev@izs.me'))
.then(() => write('foo', 'bar'))
.then(() => git('add', 'foo'))
.then(() => git('commit', '-m', 'foobar'))
Expand Down
2 changes: 2 additions & 0 deletions test/is-clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ const write = (file, data) => writeFile(resolve(repo, file), data)

t.test('create git repo', t =>
spawn(['init'], { cwd: repo })
.then(() => spawn(['config', 'user.name', 'pacotedev'], { cwd: repo }))
.then(() => spawn(['config', 'user.email', 'i+pacotedev@izs.me'], { cwd: repo }))
.then(() => write('hello', 'world')))

t.test('dir is clean, just one unknown file', t =>
Expand Down

0 comments on commit acdfab9

Please sign in to comment.