equal
deleted
inserted
replaced
1 import React from 'react'; |
1 import React from 'react'; |
2 import ReactDOM from 'react-dom'; |
2 import ReactDOM from 'react-dom'; |
3 import {Provider} from 'react-redux'; |
3 import { Provider } from 'react-redux'; |
|
4 import { MemoryRouter } from 'react-router'; |
|
5 import { createMemoryHistory } from 'history' |
4 |
6 |
5 import App from '../App'; |
7 import App from '../App'; |
6 import configureStore from '../store/configureStore'; |
8 import configureStore from '../store/configureStore'; |
7 |
9 |
8 beforeAll(() => { |
10 beforeAll(() => { |
11 removeAllRanges: () => {} |
13 removeAllRanges: () => {} |
12 }; |
14 }; |
13 }; |
15 }; |
14 }); |
16 }); |
15 |
17 |
16 const store = configureStore(); |
18 const history = createMemoryHistory(); |
|
19 const { store } = configureStore(history); |
17 |
20 |
18 it('renders without crashing', () => { |
21 it('renders without crashing', () => { |
19 const div = document.createElement('div'); |
22 const div = document.createElement('div'); |
20 ReactDOM.render( |
23 ReactDOM.render( |
21 <Provider store={store}> |
24 <Provider store={store}> |
22 <App /> |
25 <MemoryRouter> |
|
26 <App /> |
|
27 </MemoryRouter> |
23 </Provider>, |
28 </Provider>, |
24 div); |
29 div); |
25 }); |
30 }); |