diff --git a/frontend/src/features/Reporting/useCases/__tests__/archiveReporting.test.ts b/frontend/src/features/Reporting/useCases/__tests__/archiveReporting.test.ts index b12e41fb71..087a37848c 100644 --- a/frontend/src/features/Reporting/useCases/__tests__/archiveReporting.test.ts +++ b/frontend/src/features/Reporting/useCases/__tests__/archiveReporting.test.ts @@ -2,7 +2,7 @@ import { PendingAlertValueType } from '@features/Alert/types' import { fortyHeightHourAlertReporting } from '@features/Reporting/useCases/__tests__/__mocks__/dummyReporting' import { archiveReporting } from '@features/Reporting/useCases/archiveReporting' import { describe, it, expect, afterAll } from '@jest/globals' -import { dispatchProcessor } from '@store/__tests__/utils' +import { mockedDispatch } from '@store/__tests__/utils' import { VesselIdentifier } from '../../../../domain/entities/vessel/types' import { deleteReporting } from '../deleteReporting' @@ -45,7 +45,7 @@ describe('archiveReporting()', () => { it('Should delete reporting When alert is MISSING_FAR_48_HOURS_ALERT', async () => { // When - dispatchProcessor(archiveReporting(fortyHeightHourAlertReporting), INITIAL_STATE) + mockedDispatch(archiveReporting(fortyHeightHourAlertReporting), INITIAL_STATE) // Then expect(deleteReporting).toHaveBeenCalled() @@ -62,7 +62,7 @@ describe('archiveReporting()', () => { } // When - dispatchProcessor(archiveReporting(otherAlertReporting), INITIAL_STATE) + mockedDispatch(archiveReporting(otherAlertReporting), INITIAL_STATE) // Then expect(deleteReporting).toHaveBeenCalledTimes(0) diff --git a/frontend/src/store/__tests__/utils.ts b/frontend/src/store/__tests__/utils.ts index 2bafae9f39..785c7455db 100644 --- a/frontend/src/store/__tests__/utils.ts +++ b/frontend/src/store/__tests__/utils.ts @@ -6,7 +6,7 @@ import { jest } from '@jest/globals' * we could have more middleware functions being called within the * use-case middleware, and we should be able to capture all of these events. */ -export const dispatchProcessor = (action, initialState) => { +export const mockedDispatch = (action, initialState) => { const store = { dispatch: jest.fn(fn => { if (typeof fn === 'function') {