You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
One of my app dependencies (amazon-cognito-identity-js) recently added a
.web.jsfilecryptoSecureRandomInt.jsfor node and browsercryptoSecureRandomInt.web.jsfor browser onlyThis broke my tests because
react-scripts testloads the.web.jsfile and does not findglobal.window.crypto.I fixed the issue by adding an jsdom like emulation of
global.window.cryptoinsrc/setupTests.js.But my question is: should
react-scripts testpick.jsfiles over.web.jsinstead ?for ex, something like:
create-react-app/packages/react-scripts/scripts/utils/createJestConfig.js
Line 63 in 5fc8350
Beta Was this translation helpful? Give feedback.
All reactions