diff --git a/__tests__/comment.test.ts b/__tests__/comment.test.ts index 8149e8f..8c140dd 100644 --- a/__tests__/comment.test.ts +++ b/__tests__/comment.test.ts @@ -159,13 +159,13 @@ describe("createComment", () => { beforeEach(() => { jest .spyOn(octokit.rest.issues, "createComment") - .mockResolvedValue("") + .mockResolvedValue("") }) it("with comment body or previousBody", async () => { - expect( - await createComment(octokit, repo, 456, "hello there", "") - ).toBeUndefined() + expect(await createComment(octokit, repo, 456, "hello there", "")).toEqual( + "" + ) expect(octokit.rest.issues.createComment).toBeCalledWith({ issue_number: 456, owner: "marocchino", @@ -174,7 +174,7 @@ describe("createComment", () => { }) expect( await createComment(octokit, repo, 456, "hello there", "TypeA") - ).toBeUndefined() + ).toEqual("") expect(octokit.rest.issues.createComment).toBeCalledWith({ issue_number: 456, owner: "marocchino",