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.js
filecryptoSecureRandomInt.js
for node and browsercryptoSecureRandomInt.web.js
for browser onlyThis broke my tests because
react-scripts test
loads the.web.js
file and does not findglobal.window.crypto
.I fixed the issue by adding an jsdom like emulation of
global.window.crypto
insrc/setupTests.js
.But my question is: should
react-scripts test
pick.js
files over.web.js
instead ?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