From cf7dcfffcf8409977178bfef32d72ba5fabc62fd Mon Sep 17 00:00:00 2001 From: Naoki Oketani Date: Thu, 1 May 2025 13:16:23 +0000 Subject: [PATCH] Fix tests to work with @octokit/rest v21.1.1 --- __tests__/main.test.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/__tests__/main.test.ts b/__tests__/main.test.ts index 569507a..3b539ce 100644 --- a/__tests__/main.test.ts +++ b/__tests__/main.test.ts @@ -8,6 +8,19 @@ import * as pr from '../src/pr' jest.mock('../src/audit') jest.mock('../src/issue') jest.mock('../src/pr') +jest.mock('@octokit/rest', () => { + return { + Octokit: jest.fn().mockImplementation(() => { + return { + issues: { + listForRepo: jest.fn(), + createComment: jest.fn(), + create: jest.fn() + } + } + }) + } +}) describe('run: pr', () => { beforeEach(() => {