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

createMockStore is not a function #3

Open
huan opened this issue Sep 13, 2021 · 0 comments
Open

createMockStore is not a function #3

huan opened this issue Sep 13, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@huan
Copy link
Owner

huan commented Sep 13, 2021

When running with ES Module mode, we have to:

import * as MOCK_STORE 'redux-mock-store'
const createMockStore = (MOCK_STORE.default as any).default as typeof MOCK_STORE.default

The above code will violate the Typing system (must use as any), but it works for the final code.

To be investigated.

Version

  • "redux-mock-store": "^1.5.4"
  • "@types/redux-mock-store": "^1.0.3"

Link to

@huan huan added the bug Something isn't working label Sep 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant