redux-mock-store
redux-mock-store copied to clipboard
The Documentation is wrong for CommonJS
Hi, For CommonJS version you need to put:
const configureStore = require('redux-mock-store').default;
instead of
const { configureStore } = require('redux-mock-store'), also this:
const configureStore = require('redux-mock-store') doesn't work.
the problem is related with the double export statement that you make:
export function configureStore ...
export default configureStore
Regarding of that, it's a great tool for testing!
The export syntax has been changed, you shall use now with latest version the following export
const { createMockStore } = require('redux-mock-store')