Skip to content

Commit 8c9c3b0

Browse files
committed
fix test
Signed-off-by: Adam Setch <adam.setch@outlook.com>
1 parent f10fb31 commit 8c9c3b0

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/renderer/utils/helpers.test.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import {
44
ChevronRightIcon,
55
} from '@primer/octicons-react';
66

7+
import { mockGitHubCloudAccount } from '../__mocks__/account-mocks';
78
import { mockGitifyNotification } from '../__mocks__/notifications-mocks';
8-
import { mockToken } from '../__mocks__/state-mocks';
99

1010
import type { GitifySubject, Hostname, Link, SubjectType } from '../types';
1111

@@ -127,8 +127,8 @@ describe('renderer/utils/helpers.ts', () => {
127127

128128
expect(getHtmlUrlSpy).toHaveBeenCalledTimes(1);
129129
expect(getHtmlUrlSpy).toHaveBeenCalledWith(
130+
mockGitHubCloudAccount,
130131
mockLatestCommentUrl,
131-
mockToken,
132132
);
133133
expect(result).toBe(`${mockHtmlUrl}?${mockNotificationReferrer}`);
134134
});
@@ -157,7 +157,10 @@ describe('renderer/utils/helpers.ts', () => {
157157
});
158158

159159
expect(getHtmlUrlSpy).toHaveBeenCalledTimes(1);
160-
expect(getHtmlUrlSpy).toHaveBeenCalledWith(mockSubjectUrl, mockToken);
160+
expect(getHtmlUrlSpy).toHaveBeenCalledWith(
161+
mockGitHubCloudAccount,
162+
mockSubjectUrl,
163+
);
161164
expect(result).toBe(`${mockHtmlUrl}?${mockNotificationReferrer}`);
162165
});
163166
});

0 commit comments

Comments
 (0)