From 663189086d78ca788483e99479de94e42fd44c24 Mon Sep 17 00:00:00 2001 From: Jack Greenlee Date: Thu, 25 Jan 2024 14:48:07 -0500 Subject: [PATCH] fix notifScheduler test This test failed due to a bad merge conflict resolution. This commit reverts notifScheduler.test.ts to the state of 3cbb5f063028008d7d20d925cdb430d3fdc5ed5a after sebastianbarry's fix. The test now passes. --- www/__tests__/notifScheduler.test.ts | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/www/__tests__/notifScheduler.test.ts b/www/__tests__/notifScheduler.test.ts index f7cdd92ab..a002171b4 100644 --- a/www/__tests__/notifScheduler.test.ts +++ b/www/__tests__/notifScheduler.test.ts @@ -68,20 +68,11 @@ jest.mock('i18next', () => ({ })); jest.mock('../js/services/commHelper', () => ({ - ...jest.requireActual('../js/services/commHelper'), - getUser: jest.fn(() => - Promise.resolve({ - // These values are **important**... - // reminder_assignment: must match a key from the reminder scheme above, - // reminder_join_date: must match the first day of the mocked notifs below in the tests, - // reminder_time_of_day: must match the defaultTime from the chosen reminder_assignment in the reminder scheme above - reminder_assignment: 'weekly', - reminder_join_date: '2023-11-14', - reminder_time_of_day: '21:00', - }), - ), - updateUser: jest.fn(() => Promise.resolve()), + getUser: jest.fn(), + updateUser: jest.fn(), })); +const mockGetUser = getUser as jest.Mock; +const mockUpdateUser = updateUser as jest.Mock; jest.mock('../js/plugin/clientStats', () => ({ ...jest.requireActual('../js/plugin/clientStats'),