Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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))),
Expand All @@ -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 () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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))),
Expand All @@ -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 () => {
Expand Down