|
1 | 1 | import type { ExecutionResult } from 'graphql'; |
2 | 2 |
|
| 3 | +import type { DeepPartial } from '../../__helpers__/test-utils'; |
3 | 4 | import { mockGitHubCloudAccount } from '../../__mocks__/account-mocks'; |
4 | 5 | import { |
5 | 6 | mockGitHubCloudGitifyNotifications, |
@@ -33,6 +34,7 @@ import { |
33 | 34 | FetchPullRequestByNumberDocument, |
34 | 35 | type FetchPullRequestByNumberQuery, |
35 | 36 | } from './graphql/generated/graphql'; |
| 37 | +import type { OctokitClient } from './octokit'; |
36 | 38 | import * as octokitModule from './octokit'; |
37 | 39 | import * as apiRequests from './request'; |
38 | 40 |
|
@@ -63,8 +65,12 @@ describe('renderer/utils/api/client.ts', () => { |
63 | 65 |
|
64 | 66 | beforeEach(() => { |
65 | 67 | // Mock createOctokitClient to return our mock |
66 | | - createOctokitClientSpy.mockResolvedValue(mockOctokit as any); |
67 | | - createOctokitClientUncachedSpy.mockResolvedValue(mockOctokit as any); |
| 68 | + createOctokitClientSpy.mockResolvedValue( |
| 69 | + mockOctokit as unknown as OctokitClient, |
| 70 | + ); |
| 71 | + createOctokitClientUncachedSpy.mockResolvedValue( |
| 72 | + mockOctokit as unknown as OctokitClient, |
| 73 | + ); |
68 | 74 |
|
69 | 75 | // Mock Octokit REST method |
70 | 76 | mockOctokit.rest.activity.listNotificationsForAuthenticatedUser.mockResolvedValue( |
|
0 commit comments