Skip to content

Commit 316d491

Browse files
committed
Update tests
1 parent dadbe89 commit 316d491

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

__tests__/comment.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,13 @@ describe("createComment", () => {
159159
beforeEach(() => {
160160
jest
161161
.spyOn<any, string>(octokit.rest.issues, "createComment")
162-
.mockResolvedValue("")
162+
.mockResolvedValue("<return value>")
163163
})
164164

165165
it("with comment body or previousBody", async () => {
166-
expect(
167-
await createComment(octokit, repo, 456, "hello there", "")
168-
).toBeUndefined()
166+
expect(await createComment(octokit, repo, 456, "hello there", "")).toEqual(
167+
"<return value>"
168+
)
169169
expect(octokit.rest.issues.createComment).toBeCalledWith({
170170
issue_number: 456,
171171
owner: "marocchino",
@@ -174,7 +174,7 @@ describe("createComment", () => {
174174
})
175175
expect(
176176
await createComment(octokit, repo, 456, "hello there", "TypeA")
177-
).toBeUndefined()
177+
).toEqual("<return value>")
178178
expect(octokit.rest.issues.createComment).toBeCalledWith({
179179
issue_number: 456,
180180
owner: "marocchino",

0 commit comments

Comments
 (0)