Skip to content

Commit 185d25e

Browse files
author
Benjamin Brown
committed
add test
1 parent 13cb7cd commit 185d25e

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

test/specs/commit.spec.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,25 @@ describe("bump --commit", () => {
6868
git[0].cmd.should.equal('git commit -a -m "release v1.1.0"');
6969
});
7070

71+
it("should commit without running pre-commit hooks", () => {
72+
files.create("package.json", { version: "1.0.0" });
73+
74+
let bump = chaiExec("--minor --commit --all --no-verify");
75+
76+
bump.stderr.should.be.empty;
77+
bump.should.have.exitCode(0);
78+
79+
bump.should.have.stdout(
80+
`${check} Updated package.json to 1.1.0\n` +
81+
`${check} Git commit\n`
82+
);
83+
84+
let git = mocks.git();
85+
git.length.should.equal(1);
86+
87+
git[0].cmd.should.equal('git commit --no-verify -a -m "release v1.1.0"');
88+
});
89+
7190
it("should commit the manifest files to git with a message", () => {
7291
files.create("package.json", { version: "1.0.0" });
7392

0 commit comments

Comments
 (0)