Skip to content

Commit c011c01

Browse files
committed
refactor: refactor mock notification and translation
1 parent 8a685b8 commit c011c01

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

apps/web/src/hooks/__tests__/useInstrumentVisualization.test.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,6 @@ const mockBasicIsoString = '2025-04-30';
3535

3636
const mockUseDownload = vi.fn();
3737

38-
const mockNotification = {
39-
useNotificationsStore: vi.fn()
40-
};
41-
const mockTranslation = {
42-
useTranslation: vi.fn()
43-
};
44-
4538
const mockInfoQuery = {
4639
useInstrumentInfoQuery: vi.fn()
4740
};
@@ -56,8 +49,8 @@ vi.mock('@/store', () => ({
5649

5750
vi.mock('@douglasneuroinformatics/libui/hooks', () => ({
5851
useDownload: () => mockUseDownload,
59-
useNotificationsStore: () => mockNotification,
60-
useTranslation: () => mockTranslation
52+
useNotificationsStore: () => ({ addNotification: vi.fn() }),
53+
useTranslation: () => ({ t: vi.fn((key) => key) })
6154
}));
6255

6356
vi.mock('react', async (importOriginal) => {

0 commit comments

Comments
 (0)