Skip to content

Commit

Permalink
Fix getPullRequestDiff test
Browse files Browse the repository at this point in the history
  • Loading branch information
szweier committed May 30, 2024
1 parent 6883bcf commit 7b7d74b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/platforms/github/_tests/_github_api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,15 @@ describe("API testing", () => {
json: jest
.fn()
.mockImplementation(() =>
Promise.resolve<GitHubFile[]>(JSON.parse('[{"filename": "file.txt", "patch": "+ hello"}]'))
Promise.resolve<GitHubFile[]>(JSON.parse('[{"filename": "file.txt", "status": "added", "patch": "+ hello"}]'))
),
})

let diff = await api.getPullRequestDiff()

let expected = `
diff --git a/file.txt b/file.txt
new file mode 0
--- a/file.txt
+++ b/file.txt
+ hello
Expand Down

0 comments on commit 7b7d74b

Please sign in to comment.