-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jest-runtime
makes each module to have its own modules cache
#4940
Comments
Jest does not support |
Thanks for the advice, I'll give it a try. |
Confirmed, it works. Thank you! :-D |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Printing the content of
require.cache
in several files, they are shown as being isolated ones from others instead of being shared as Node.jsrequire()
function does. Jest-runtime has its own require function, and in fact this behaviour seems to be on purposse to prevent modules do side-effects, but in fact that side-effects is exactly what does the react-native-mock-render module, so it doesn't work at all.What is the expected behavior?
require.cache
being shared by all the modules as does Node.js implementation, so replacing entries on it affect the full Node.js instance.Please provide your exact Jest configuration and mention your Jest, node,
yarn/npm version and operating system.
Jest: 21.2.1
Node.js: 9.2.0
npm: 5.5.1
The text was updated successfully, but these errors were encountered: