-
-
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
[Bug]: failed to clear require cache #12106
Comments
I have the same problem. https://stackoverflow.com/questions/71001519/unable-to-invalidate-the-require-cache-jest-cache |
Currently, jest does not support this feature, but i think it could be supported. |
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. |
Version
27.4.2
Steps to reproduce
pnpm install
pnpx jest ./index.spec.js
Expected behavior
Expect to see require a totally different module, but I get the same value a = 1.
However, the refenence‘s expect works, as the doc said:
https://jestjs.io/docs/jest-object#jestresetmodules
Actual behavior
Should it be any way to clear require cache
Additional context
No response
Environment
The text was updated successfully, but these errors were encountered: