Skip to content

Commit 8c90ed0

Browse files
committed
test: 💍 fix tests
1 parent be28b1f commit 8c90ed0

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/index.test.ts

+10-3
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,21 @@ describe("jiraPrValidation()", () => {
1717
global.markdown = undefined;
1818
});
1919

20-
it("Checks for a that message has been called", () => {
20+
it("Checks for a that message has been called", async () => {
2121
global.danger = {
22-
github: { pr: { title: "My Test Title", base: "pr-base" } },
22+
github: {
23+
pr: {
24+
title: "My Test Title",
25+
base: { ref: "pr-base" },
26+
head: { ref: "pr-head" },
27+
},
28+
},
2329
};
2430

25-
jiraPrValidation();
31+
await jiraPrValidation("baseUrl", "username", "token", "projectKey");
2632

2733
expect(global.message).toHaveBeenCalledWith("PR Title: My Test Title");
2834
expect(global.message).toHaveBeenCalledWith("PR Base: pr-base");
35+
expect(global.message).toHaveBeenCalledWith("PR Head: pr-head");
2936
});
3037
});

0 commit comments

Comments
 (0)