Skip to content

Commit 992d7ca

Browse files
committed
test: cherryPick can throw error
Adds another simple test case that shows that cherryPick can throw an error when it exits with a non-zero exit code.
1 parent b0868a0 commit 992d7ca

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/test/git.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,14 @@ describe("git.fetch", () => {
3333
});
3434
});
3535
});
36+
37+
describe("git.cherryPick", () => {
38+
describe("throws Error", () => {
39+
it("when failing with an unexpected non-zero exit code", async () => {
40+
response.exitCode = 1;
41+
await expect(git.cherryPick(["unknown"], "")).rejects.toThrowError(
42+
`'git cherry-pick -x unknown' failed with exit code 1`,
43+
);
44+
});
45+
});
46+
});

0 commit comments

Comments
 (0)