mirror of
https://github.com/marocchino/sticky-pull-request-comment.git
synced 2025-12-14 04:21:14 +00:00
Update tests
This commit is contained in:
parent
dadbe89de1
commit
316d491c26
1 changed files with 5 additions and 5 deletions
|
|
@ -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",
|
||||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in a new issue