diff --git a/app/javascript/packages/document-capture/components/address-search.spec.tsx b/app/javascript/packages/document-capture/components/address-search.spec.tsx index af85cf815eb..936e5609c6d 100644 --- a/app/javascript/packages/document-capture/components/address-search.spec.tsx +++ b/app/javascript/packages/document-capture/components/address-search.spec.tsx @@ -1,7 +1,6 @@ import { render } from '@testing-library/react'; import { useSandbox } from '@18f/identity-test-helpers'; import userEvent from '@testing-library/user-event'; -import { fetch } from 'whatwg-fetch'; import { setupServer } from 'msw/node'; import { rest } from 'msw'; import type { SetupServerApi } from 'msw/node'; @@ -26,7 +25,6 @@ describe('AddressSearch', () => { let server: SetupServerApi; before(() => { - global.window.fetch = fetch; server = setupServer( rest.post(LOCATIONS_URL, (_req, res, ctx) => res(ctx.json([{ name: 'Baltimore' }]))), rest.post(ADDRESS_SEARCH_URL, (_req, res, ctx) => res(ctx.json(DEFAULT_RESPONSE))), @@ -36,7 +34,6 @@ describe('AddressSearch', () => { after(() => { server.close(); - global.window.fetch = () => Promise.reject(new Error('Fetch must be stubbed')); }); it('fires the callback with correct input', async () => { diff --git a/app/javascript/packages/document-capture/components/in-person-location-step.spec.tsx b/app/javascript/packages/document-capture/components/in-person-location-step.spec.tsx index b0370f8a693..e2a1b696d3b 100644 --- a/app/javascript/packages/document-capture/components/in-person-location-step.spec.tsx +++ b/app/javascript/packages/document-capture/components/in-person-location-step.spec.tsx @@ -3,7 +3,6 @@ import { useContext } from 'react'; import { render } from '@testing-library/react'; import { getAllByRole } from '@testing-library/dom'; import userEvent from '@testing-library/user-event'; -import { fetch } from 'whatwg-fetch'; import { setupServer } from 'msw/node'; import { rest } from 'msw'; import type { SetupServerApi } from 'msw/node'; @@ -37,7 +36,6 @@ const DEFAULT_PROPS = { describe('InPersonLocationStep', () => { let server: SetupServerApi; before(() => { - global.window.fetch = fetch; server = setupServer( rest.post(LOCATIONS_URL, (_req, res, ctx) => res(ctx.json([{ name: 'Baltimore' }]))), rest.post(ADDRESS_SEARCH_URL, (_req, res, ctx) => res(ctx.json(DEFAULT_RESPONSE))), @@ -48,7 +46,6 @@ describe('InPersonLocationStep', () => { after(() => { server.close(); - global.window.fetch = () => Promise.reject(new Error('Fetch must be stubbed')); }); it('logs step submission with selected location', async () => {