Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Documentation is wrong for CommonJS #175

Open
Frankeo opened this issue Feb 29, 2020 · 1 comment
Open

The Documentation is wrong for CommonJS #175

Frankeo opened this issue Feb 29, 2020 · 1 comment

Comments

@Frankeo
Copy link

Frankeo commented Feb 29, 2020

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!

@JabbyPanda
Copy link

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants