diff --git a/frontend/__tests__/components/Common/DateRangeViewer/DateRangeViewer.test.tsx b/frontend/__tests__/components/Common/DateRangeViewer/DateRangeViewer.test.tsx index e23778be82..5ab80b37c1 100644 --- a/frontend/__tests__/components/Common/DateRangeViewer/DateRangeViewer.test.tsx +++ b/frontend/__tests__/components/Common/DateRangeViewer/DateRangeViewer.test.tsx @@ -1,4 +1,4 @@ -import { backStep, nextStep, updateFailedTimeRange } from '@src/context/stepper/StepperSlice'; +import { nextStep, updateFailedTimeRange } from '@src/context/stepper/StepperSlice'; import DateRangeViewer from '@src/components/Common/DateRangeViewer'; import { DateRange } from '@src/context/config/configSlice'; import { setupStore } from '@test/utils/setupStoreUtil'; @@ -71,7 +71,6 @@ describe('DateRangeViewer', () => { }); it('should not show priority high icon when click expand button and step number is 0', async () => { - store.dispatch(backStep()); const { getByLabelText } = setup(mockDateRanges); await userEvent.click(getByLabelText('expandMore')); expect(screen.queryByTestId('PriorityHighIcon')).not.toBeInTheDocument(); diff --git a/frontend/package.json b/frontend/package.json index f8a38ec005..3830f6d994 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -12,8 +12,8 @@ "lint": "eslint -c .eslintrc.json ./ && prettier --check ./", "fix": "eslint -c .eslintrc.json --fix && npx prettier --write . --ignore-unknown", "audit": "npx audit-ci@^6 --config ./audit-ci.jsonc", - "test": "jest", - "test:watch": "jest --watchAll", + "test": "jest --env=jsdom", + "test:watch": "jest --env=jsdom --watchAll", "coverage": "jest --env=jsdom --watchAll=false --coverage", "coverage:silent": "jest --env=jsdom --watchAll=false --coverage --silent", "pre-e2e": "./scripts/generate-config-files.sh",