bigbuffet-rw/app/soapbox/test_setup.js
2020-06-09 17:28:32 -05:00

16 lines
443 B
JavaScript

'use strict';
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import thunk from 'redux-thunk';
import configureMockStore from 'redux-mock-store';
import { __clear as clearApiMocks } from 'soapbox/api';
const adapter = new Adapter();
configure({ adapter });
jest.mock('soapbox/api');
afterEach(() => clearApiMocks());
const middlewares = [thunk];
export const mockStore = configureMockStore(middlewares);