bigbuffet-rw/app/soapbox/test_setup.js

17 lines
366 B
JavaScript
Raw Normal View History

2020-03-27 13:59:38 -07:00
'use strict';
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
2022-03-16 11:55:18 -07:00
import { server } from 'soapbox/msw';
2020-03-27 13:59:38 -07:00
// Enzyme
2020-03-27 13:59:38 -07:00
const adapter = new Adapter();
configure({ adapter });
2022-03-16 11:55:18 -07:00
// Setup MSW
// https://mswjs.io/docs/api/setup-server
beforeAll(() => server.listen());
afterEach(() => server.resetHandlers());
afterAll(() => server.close());