Skip to content

Commit

Permalink
test: fix async mock-git tests (#54)
Browse files Browse the repository at this point in the history
* Closes #51 
* Closes #54
  • Loading branch information
Tapppi authored and tomchentw committed Jun 8, 2016
1 parent 4b2e9c7 commit 5e56185
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ describe('cli', function () {
describe('with mocked git', function () {
it('--sign signs the commit and tag', function () {
// mock git with file that writes args to gitcapture.log
mockGit('require("fs").appendFileSync("gitcapture.log", JSON.stringify(process.argv.splice(2)) + "\\n")')
return mockGit('require("fs").appendFileSync("gitcapture.log", JSON.stringify(process.argv.splice(2)) + "\\n")')
.then(function (unmock) {
writePackageJson('1.0.0')

Expand All @@ -106,7 +106,7 @@ describe('cli', function () {

it('exits with error code if git commit fails', function () {
// mock git by throwing on attempt to commit
mockGit('console.error("commit yourself"); process.exit(128);', 'commit')
return mockGit('console.error("commit yourself"); process.exit(128);', 'commit')
.then(function (unmock) {
writePackageJson('1.0.0')

Expand Down

0 comments on commit 5e56185

Please sign in to comment.