mirror of
https://github.com/marocchino/sticky-pull-request-comment.git
synced 2025-12-14 12:31: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(() => {
|
beforeEach(() => {
|
||||||
jest
|
jest
|
||||||
.spyOn<any, string>(octokit.rest.issues, "createComment")
|
.spyOn<any, string>(octokit.rest.issues, "createComment")
|
||||||
.mockResolvedValue("")
|
.mockResolvedValue("<return value>")
|
||||||
})
|
})
|
||||||
|
|
||||||
it("with comment body or previousBody", async () => {
|
it("with comment body or previousBody", async () => {
|
||||||
expect(
|
expect(await createComment(octokit, repo, 456, "hello there", "")).toEqual(
|
||||||
await createComment(octokit, repo, 456, "hello there", "")
|
"<return value>"
|
||||||
).toBeUndefined()
|
)
|
||||||
expect(octokit.rest.issues.createComment).toBeCalledWith({
|
expect(octokit.rest.issues.createComment).toBeCalledWith({
|
||||||
issue_number: 456,
|
issue_number: 456,
|
||||||
owner: "marocchino",
|
owner: "marocchino",
|
||||||
|
|
@ -174,7 +174,7 @@ describe("createComment", () => {
|
||||||
})
|
})
|
||||||
expect(
|
expect(
|
||||||
await createComment(octokit, repo, 456, "hello there", "TypeA")
|
await createComment(octokit, repo, 456, "hello there", "TypeA")
|
||||||
).toBeUndefined()
|
).toEqual("<return value>")
|
||||||
expect(octokit.rest.issues.createComment).toBeCalledWith({
|
expect(octokit.rest.issues.createComment).toBeCalledWith({
|
||||||
issue_number: 456,
|
issue_number: 456,
|
||||||
owner: "marocchino",
|
owner: "marocchino",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue