2020-03-27 13:59:38 -07:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
import { configure } from 'enzyme';
|
|
|
|
import Adapter from 'enzyme-adapter-react-16';
|
2020-06-09 15:28:32 -07:00
|
|
|
import thunk from 'redux-thunk';
|
|
|
|
import configureMockStore from 'redux-mock-store';
|
2020-06-09 15:16:22 -07:00
|
|
|
import { __clear as clearApiMocks } from 'soapbox/api';
|
2020-03-27 13:59:38 -07:00
|
|
|
|
|
|
|
const adapter = new Adapter();
|
|
|
|
configure({ adapter });
|
2020-06-09 14:47:41 -07:00
|
|
|
|
|
|
|
jest.mock('soapbox/api');
|
2020-06-09 15:16:22 -07:00
|
|
|
afterEach(() => clearApiMocks());
|
2020-06-09 15:28:32 -07:00
|
|
|
|
|
|
|
const middlewares = [thunk];
|
|
|
|
export const mockStore = configureMockStore(middlewares);
|