refactor: Upgrade Redux (#11967)

* upgrade redux and react-redux, adjust types

* first round of test fixes

* fix rest of unit tests

* lint

Co-authored-by: Phillip Kelley-Dotson <pkelleydotson@yahoo.com>
This commit is contained in:
David Aaron Suddjian
2020-12-09 11:58:42 -08:00
committed by GitHub
parent 9121482479
commit 6270fa2026
41 changed files with 354 additions and 253 deletions

View File

@@ -20,6 +20,7 @@ import React from 'react';
import thunk from 'redux-thunk';
import configureStore from 'redux-mock-store';
import fetchMock from 'fetch-mock';
import { Provider } from 'react-redux';
import { styledMount as mount } from 'spec/helpers/theming';
import DatasetList from 'src/views/CRUD/data/dataset/DatasetList';
@@ -74,9 +75,11 @@ fetchMock.get(databaseEndpoint, {
});
async function mountAndWait(props) {
const mounted = mount(<DatasetList {...props} user={mockUser} />, {
context: { store },
});
const mounted = mount(
<Provider store={store}>
<DatasetList {...props} user={mockUser} />
</Provider>,
);
await waitForComponentToPaint(mounted);
return mounted;