From 2d1f7927761c33c50b0a31dd40dda9419fe42c97 Mon Sep 17 00:00:00 2001 From: guzhongren Date: Fri, 22 Mar 2024 23:38:43 +0800 Subject: [PATCH] fix(deps): fix test case [frontend] --- frontend/__tests__/context/notificationSlice.test.ts | 2 +- frontend/__tests__/context/stepperSlice.test.ts | 2 +- frontend/__tests__/utils/setupStoreUtil.tsx | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/__tests__/context/notificationSlice.test.ts b/frontend/__tests__/context/notificationSlice.test.ts index 65dc197570..68216c87c1 100644 --- a/frontend/__tests__/context/notificationSlice.test.ts +++ b/frontend/__tests__/context/notificationSlice.test.ts @@ -50,7 +50,7 @@ describe('notification reducer', () => { { id: '2', title: 'Notification', message: 'Notification Message 2' }, ], }, - closeAllNotifications, + closeAllNotifications(), ); expect(stepper.notifications).toEqual([]); diff --git a/frontend/__tests__/context/stepperSlice.test.ts b/frontend/__tests__/context/stepperSlice.test.ts index 57e5e24459..14d5d69cee 100644 --- a/frontend/__tests__/context/stepperSlice.test.ts +++ b/frontend/__tests__/context/stepperSlice.test.ts @@ -9,7 +9,7 @@ describe('stepper reducer', () => { }); it('should reset to 0 when handle reset', () => { - const stepper = stepperReducer(undefined, resetStep); + const stepper = stepperReducer(undefined, resetStep()); expect(stepper.stepNumber).toEqual(ZERO); expect(stepper.timeStamp).toEqual(ZERO); diff --git a/frontend/__tests__/utils/setupStoreUtil.tsx b/frontend/__tests__/utils/setupStoreUtil.tsx index 0130f09023..e3e531e0f6 100644 --- a/frontend/__tests__/utils/setupStoreUtil.tsx +++ b/frontend/__tests__/utils/setupStoreUtil.tsx @@ -14,6 +14,5 @@ export const setupStore = () => { [metaSlice.name]: metaSlice.reducer, [notificationSlice.name]: notificationSlice.reducer, }, - middleware: [], }); };