vendredi 6 mars 2020

env.getState is not a function in Jest test after update of react, redux

I have upgraded a lot inside my package.json, and I do now know why my Jest test for my sagas with reselect get this error:

TypeError: env.getState is not a function

I have tried different things like adding plugins. Maybe there is one, or more, plugins I am missing? I think one reason can be that I now have React with hooks, which I did not before. And maybe the new version of redux and redux-saga.

My current versions:

"react": "16.12.0",
"react-dom": "16.12.0",
"react-redux": "6.0.0",
"react-router-dom": "5.1.2",
"react-router-redux": "4.0.8",
"react-select": "2.0.0-beta.6",
"react-test-renderer": "16.4.1",
"redux": "4.0.5",
"redux-immutable": "4.0.0",
"redux-saga": "1.1.3",
"reselect": "3.0.1",

Aucun commentaire:

Enregistrer un commentaire