Skip to content

Commit 904e04c

Browse files
committed
fix: correct mock variable references in tests after rebase
1 parent 18f6413 commit 904e04c

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

src/renderer/components/notifications/NotificationRow.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ describe('renderer/components/notifications/NotificationRow.tsx', () => {
156156

157157
it('should hide mark as read button when notification is already read', async () => {
158158
const readNotification = {
159-
...mockSingleNotification,
159+
...mockGitifyNotification,
160160
unread: false,
161161
};
162162

src/renderer/components/notifications/RepositoryNotifications.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ describe('renderer/components/notifications/RepositoryNotifications.tsx', () =>
2525

2626
beforeEach(() => {
2727
// Reset mock notification state between tests since it's mutated
28-
for (const n of mockGitHubNotifications) {
28+
for (const n of mockGitHubCloudGitifyNotifications) {
2929
n.unread = true;
3030
}
3131
});

src/renderer/hooks/useNotifications.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { act, renderHook, waitFor } from '@testing-library/react';
33
import axios, { AxiosError } from 'axios';
44
import nock from 'nock';
55

6+
import { mockGitHubCloudAccount } from '../__mocks__/account-mocks';
67
import { mockGitifyNotification } from '../__mocks__/notifications-mocks';
78
import { mockAuth, mockSettings, mockState } from '../__mocks__/state-mocks';
89
import { Errors } from '../utils/errors';
@@ -115,6 +116,13 @@ describe('renderer/hooks/useNotifications.ts', () => {
115116
});
116117

117118
it('should fetch detailed notifications with success', async () => {
119+
const mockNotificationUser = {
120+
login: 'test-user',
121+
html_url: 'https://github.com/test-user',
122+
avatar_url: 'https://avatars.githubusercontent.com/u/1?v=4',
123+
type: 'User',
124+
};
125+
118126
const mockRepository = {
119127
name: 'notifications-test',
120128
full_name: 'gitify-app/notifications-test',

0 commit comments

Comments
 (0)