Tests: DRY mockStore()
This commit is contained in:
@ -2,6 +2,8 @@
|
||||
|
||||
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();
|
||||
@ -9,3 +11,6 @@ configure({ adapter });
|
||||
|
||||
jest.mock('soapbox/api');
|
||||
afterEach(() => clearApiMocks());
|
||||
|
||||
const middlewares = [thunk];
|
||||
export const mockStore = configureMockStore(middlewares);
|
||||
|
||||
Reference in New Issue
Block a user