redux-mock-store icon indicating copy to clipboard operation
redux-mock-store copied to clipboard

The Documentation is wrong for CommonJS

Open Frankeo opened this issue 5 years ago • 1 comments

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!

Frankeo avatar Feb 29 '20 14:02 Frankeo

The export syntax has been changed, you shall use now with latest version the following export

const { createMockStore }  = require('redux-mock-store')

JabbyPanda avatar Mar 09 '20 12:03 JabbyPanda