score:35

Accepted answer

Ran into the similar problem last week, we have a React-Native project that has recently upgraded to:

"react-native": "0.45.1"
"react": "16.0.0-alpha.12"
"jest": "20.0.4"
"react-test-renderer": "15.5.4"

and then we try to run our Jest tests and we saw the same issue as you mentioned above. Then we realized there is a cutting edge version of the react-test-renderer and we tried that one out:

"react-test-renderer": "^16.0.0-alpha.12",

And now the issue is no longer there.

score:0

The package named "storyshots" (link to the old package for reference) is deprecated and replaced by "@storybook/addon-storyshots" at the time of writing (2022), see official documentation

score:5

While upgrading to React 16.0.0, I did notice that you do need to upgrade react-dom to 16.0.0 and it works flawless!

score:7

On 0.47.0

Still had errors with the accepted answer had to do the following:

"react-dom": "^16.0.0-beta.5", "react-test-renderer": "16.0.0-alpha.12",

enzyme will work with the above changes but any sort of simulation will not, disabled taps until they support.


Related Query

More Query from same tag