2017-10-25 02:17:26 +00:00
|
|
|
import React from 'react';
|
|
|
|
import Enzyme from 'enzyme';
|
|
|
|
import Adapter from 'enzyme-adapter-react-16';
|
|
|
|
import Swap from 'containers/Tabs/Swap';
|
|
|
|
import shallowWithStore from '../utils/shallowWithStore';
|
|
|
|
import { createMockStore } from 'redux-test-utils';
|
2017-12-11 17:44:53 +00:00
|
|
|
import { INITIAL_STATE } from 'reducers/swap';
|
2017-10-25 02:17:26 +00:00
|
|
|
|
|
|
|
Enzyme.configure({ adapter: new Adapter() });
|
|
|
|
|
|
|
|
it('render snapshot', () => {
|
2017-12-11 17:44:53 +00:00
|
|
|
const store = createMockStore({ swap: INITIAL_STATE });
|
2017-10-25 02:17:26 +00:00
|
|
|
const component = shallowWithStore(<Swap />, store);
|
|
|
|
|
|
|
|
expect(component).toMatchSnapshot();
|
|
|
|
});
|