Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aburgel committed May 5, 2023
1 parent dadbe89 commit 316d491
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions __tests__/comment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,13 @@ describe("createComment", () => {
beforeEach(() => {
jest
.spyOn<any, string>(octokit.rest.issues, "createComment")
.mockResolvedValue("")
.mockResolvedValue("<return value>")
})

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(
"<return value>"
)
expect(octokit.rest.issues.createComment).toBeCalledWith({
issue_number: 456,
owner: "marocchino",
Expand All @@ -174,7 +174,7 @@ describe("createComment", () => {
})
expect(
await createComment(octokit, repo, 456, "hello there", "TypeA")
).toBeUndefined()
).toEqual("<return value>")
expect(octokit.rest.issues.createComment).toBeCalledWith({
issue_number: 456,
owner: "marocchino",
Expand Down

0 comments on commit 316d491

Please sign in to comment.