Skip to content

Commit

Permalink
Remove unnecessary mocks
Browse files Browse the repository at this point in the history
  • Loading branch information
alimpens committed Nov 25, 2024
1 parent e3016b0 commit 7698437
Showing 1 changed file with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down Expand Up @@ -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()
})
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 7698437

Please sign in to comment.