I want to know if there is a way to configure jest and enzyme tests to contain a react store? I'm aware that there is a way to configure a store for an individual react component when it is connected with redux. I have a helper method which returns an array of react components which are untested. So instead of testing all 20 react components, I think configuring a mock store should solve it. This is my error:
FAIL src/core/factory/__tests__/searchFactory.test.js
● Test suite failed to run
TypeError: Cannot read property 'reducers' of undefined
26 | const oidcMiddleware = createOidcMiddleware(mgr, true, false, API_LOGIN_CALLBACK, null);
27 |
> 28 | const store = init({
| ^
29 | models,
30 | plugins: [selectorsPlugin()],
31 | redux: {
I want to know if there is a way to configure jest and enzyme tests to contain a react store? I'm aware that there is a way to configure a store for an individual react component when it is connected with redux. I have a helper method which returns an array of react components which are untested. So instead of testing all 20 react components, I think configuring a mock store should solve it. This is my error: