From 0ccee7f4d57f5a145a91613cebba24d1066e3dbb Mon Sep 17 00:00:00 2001 From: Karol Josef F Bustamante Date: Sun, 8 Dec 2024 22:04:41 -0500 Subject: [PATCH] fix test: getDangerCommentIDs ignores comments not marked as generated --- source/platforms/github/_tests/_github_api.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/platforms/github/_tests/_github_api.test.ts b/source/platforms/github/_tests/_github_api.test.ts index 5a0826d06..3e43f1cd1 100644 --- a/source/platforms/github/_tests/_github_api.test.ts +++ b/source/platforms/github/_tests/_github_api.test.ts @@ -113,7 +113,8 @@ new file mode 0 it("getDangerCommentIDs ignores comments not marked as generated", async () => { api.getAllOfResource = await requestWithFixturedJSON("github_inline_comments_with_danger.json") - api.getUserID = () => new Promise((r) => r(20229914)) + api.fetch = jest.fn().mockReturnValue({ ok: true }) + api.getPullRequestInfo = await requestWithFixturedJSON("github_pr.json") const commentIDs = await api.getDangerCommentIDs("default")