Skip to content

Commit

Permalink
Possibly fix failing CI by mocking GH API
Browse files Browse the repository at this point in the history
  • Loading branch information
GaryGSC committed Jun 25, 2024
1 parent 0994092 commit 96abde3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ will **replace (delete then create)** 1 resource:
})

test('Test Empty Plan Summary', async () => {
const scope = nock('https://api.github.com').get(/.*/).reply(200, {
html_url: 'https://test/workflow/url'
})

const commenter = new PlanCommenter({
octokit: github.getOctokit('fake'),
runId: 1234,
Expand All @@ -55,6 +59,8 @@ test('Test Empty Plan Summary', async () => {
const expected = `## Terraform Plan:
No changes detected`
expect(summary).toEqual(expected)

scope.done()
})

test('Test Basic Plan with custom title', async () => {
Expand Down

0 comments on commit 96abde3

Please sign in to comment.