Skip to content

Commit 5e56185

Browse files
Tapppitomchentw
authored andcommitted
test: fix async mock-git tests (#54)
* Closes #51 * Closes #54
1 parent 4b2e9c7 commit 5e56185

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ describe('cli', function () {
8888
describe('with mocked git', function () {
8989
it('--sign signs the commit and tag', function () {
9090
// mock git with file that writes args to gitcapture.log
91-
mockGit('require("fs").appendFileSync("gitcapture.log", JSON.stringify(process.argv.splice(2)) + "\\n")')
91+
return mockGit('require("fs").appendFileSync("gitcapture.log", JSON.stringify(process.argv.splice(2)) + "\\n")')
9292
.then(function (unmock) {
9393
writePackageJson('1.0.0')
9494

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

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

0 commit comments

Comments
 (0)