Skip to content

Commit

Permalink
test: update test for pull request closed event
Browse files Browse the repository at this point in the history
  • Loading branch information
Jagoda11 committed May 30, 2024
1 parent 0407b28 commit 7d8923e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ describe('index.js', () => {

expect(nock.isDone()).toBe(true);
});

test('🚪 responds to pull request closed', async () => {
test('🚪 creates a comment when a pull request is closed', async () => {
// Mock GitHub API
nock('https://api.github.com')
.post('/repos/test/test/issues/1/comments')
Expand All @@ -140,5 +139,9 @@ describe('index.js', () => {
},
},
};

await probot.receive(event);

expect(nock.isDone()).toBe(true);
});
});

0 comments on commit 7d8923e

Please sign in to comment.