From 7d8923e40f7f59f497e62d2b518552ac6a8a56ce Mon Sep 17 00:00:00 2001 From: Jagoda11 Date: Fri, 31 May 2024 00:25:44 +0200 Subject: [PATCH] test: update test for pull request closed event --- test/index.test.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/index.test.js b/test/index.test.js index eb6b0a2..522d79c 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -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') @@ -140,5 +139,9 @@ describe('index.js', () => { }, }, }; + + await probot.receive(event); + + expect(nock.isDone()).toBe(true); }); });