Removing dependency on redux-mock-store.

Commit migrated from dotnet/aspnetcore@e1b08b2739
This commit is contained in:
Simon Grimshaw 2018-06-04 21:51:57 +01:00 коммит произвёл Ryan Brandenburg
Родитель 7c95eaf597
Коммит aba1795316
2 изменённых файлов: 9 добавлений и 7 удалений

Просмотреть файл

@ -21,8 +21,5 @@
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
},
"devDependencies": {
"redux-mock-store": "^1.5.1"
}
}

Просмотреть файл

@ -2,17 +2,22 @@ import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { MemoryRouter } from 'react-router-dom';
import configureStore from 'redux-mock-store';
import App from './App';
it('renders without crashing', () => {
const mockStore = configureStore([])({});
const storeFake = (state) => ({
default: () => { },
subscribe: () => { },
dispatch: () => { },
getState: () => ({ ...state })
});
const store = storeFake({});
const div = document.createElement('div');
ReactDOM.render(
<Provider store={mockStore}>
<Provider store={store}>
<MemoryRouter>
<App />
</MemoryRouter>
</Provider>, div);
});
});