After upgrading to react 18 Jest no longer worked.
In our config-overrides.js file we are resolving crypto to crypto-browserify
which is explained here as something we do to resolve modules that are native to node but not browsers (essentially poly filling those modules for webpack 5 to be able to use them on the front end)
however now I get an error that useRecoilValue can't be used outside of RecoilRoot despite the application working just fine and having a RecoilRoot in our index.tsx file.
Fixing this issue is necessary to get our testing framework up and running again
After upgrading to react 18 Jest no longer worked.
In our
config-overrides.js
file we are resolvingcrypto
tocrypto-browserify
which is explained here as something we do to resolve modules that are native to node but not browsers (essentially poly filling those modules for webpack 5 to be able to use them on the front end)
I tried solutions from this post which actually fixed the
crypto not found
error.however now I get an error that useRecoilValue can't be used outside of RecoilRoot despite the application working just fine and having a RecoilRoot in our
index.tsx
file.Fixing this issue is necessary to get our testing framework up and running again