This commit makes the `msw` server globally available to all test files. Given that the majority of our test files will ultimately make calls to APIs using RTK Query (calls are made in both the table and the wizard), making these globally available in jest.setup.js is reasonable.
6 lines
181 B
JavaScript
6 lines
181 B
JavaScript
import 'whatwg-fetch';
|
|
import { server } from './src/test/mocks/server';
|
|
|
|
beforeAll(() => server.listen());
|
|
afterEach(() => server.resetHandlers());
|
|
afterAll(() => server.close());
|