From 769843792241ed8f0df6a507e1e88dfb3bf69e7b Mon Sep 17 00:00:00 2001 From: alimpens Date: Mon, 25 Nov 2024 11:01:03 +0100 Subject: [PATCH] Remove unnecessary mocks --- .../IncidentNavigation/IncidentNavigation.test.tsx | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/signals/incident/components/IncidentNavigation/IncidentNavigation.test.tsx b/src/signals/incident/components/IncidentNavigation/IncidentNavigation.test.tsx index 294a42ecc0..f6a943bf55 100644 --- a/src/signals/incident/components/IncidentNavigation/IncidentNavigation.test.tsx +++ b/src/signals/incident/components/IncidentNavigation/IncidentNavigation.test.tsx @@ -8,12 +8,9 @@ import wizardDefinition from 'signals/incident/definitions/wizard' import { withAppContext } from 'test/utils' import IncidentNavigation from '.' -import type configurationType from '../../../../shared/services/configuration/__mocks__/configuration' import configuration from '../../../../shared/services/configuration/configuration' import { Step, Steps, Wizard } from '../StepWizard' -const mockConfiguration = configuration as typeof configurationType - jest.mock('shared/services/auth/auth', () => ({ __esModule: true, ...jest.requireActual('shared/services/auth/auth'), @@ -52,15 +49,6 @@ jest.mock('react-router-dom', () => { jest.spyOn(reactRouterDom, 'useNavigate').mockImplementation(() => navigateSpy) describe('signals/incident/components/IncidentNavigation', () => { - afterAll(() => { - jest.restoreAllMocks() - }) - - afterEach(() => { - // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access - mockConfiguration.__reset() - }) - beforeEach(() => { handleSubmit.mockReset() }) @@ -182,7 +170,7 @@ describe('signals/incident/components/IncidentNavigation', () => { }) }) - it('Renders previous button for web version', async () => { + it('renders previous button for web version', async () => { configuration.featureFlags.appMode = false const secondStep = [...steps][1]