Skip to content

Commit 8753bbe

Browse files
committed
fix test
1 parent 512f3d9 commit 8753bbe

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

index.test.js

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,16 @@ describe("createCommitOnBranch", () => {
2727
"the description of the commit"
2828
);
2929
console.log(JSON.stringify(result, null, 2));
30-
expect(result).toMatchObject({
31-
data: {
32-
createCommitOnBranch: {
33-
commit: {
34-
url: expect.stringMatching(
35-
new RegExp(
36-
"^https:\/\/github\.com\/"+repoOwner+"\/"+repoName+"\/commit\/[a-fA-F0-9]{40}$"
37-
)
38-
),
39-
},
40-
},
41-
},
42-
});
30+
const commitUrl = result?.commitUrl || "";
31+
expect(commitUrl).toMatch(
32+
new RegExp(
33+
"^https://github.com/" +
34+
repoOwner +
35+
"/" +
36+
repoName +
37+
"/commit/[a-fA-F0-9]{40}$"
38+
)
39+
);
4340
});
4441
test("createCommitOnBranch, BAD branch", async () => {
4542
expect(async () => {

0 commit comments

Comments
 (0)