Skip to content

Commit 07d6545

Browse files
committed
feat(test): migrate from jest to vitest
Signed-off-by: Adam Setch <adam.setch@outlook.com>
1 parent f051cf7 commit 07d6545

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/renderer/utils/api/client.test.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { ExecutionResult } from 'graphql';
22

3+
import type { DeepPartial } from '../../__helpers__/test-utils';
34
import { mockGitHubCloudAccount } from '../../__mocks__/account-mocks';
45
import {
56
mockGitHubCloudGitifyNotifications,
@@ -33,6 +34,7 @@ import {
3334
FetchPullRequestByNumberDocument,
3435
type FetchPullRequestByNumberQuery,
3536
} from './graphql/generated/graphql';
37+
import type { OctokitClient } from './octokit';
3638
import * as octokitModule from './octokit';
3739
import * as apiRequests from './request';
3840

@@ -63,8 +65,12 @@ describe('renderer/utils/api/client.ts', () => {
6365

6466
beforeEach(() => {
6567
// 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+
);
6874

6975
// Mock Octokit REST method
7076
mockOctokit.rest.activity.listNotificationsForAuthenticatedUser.mockResolvedValue(

0 commit comments

Comments
 (0)