-
-
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
fix(jest-runtime): bind jest.isolateModulesAsync
to this
#14083
Conversation
abd28ba
to
e6c7f99
Compare
runtime.__mockRootPath, | ||
'ModuleWithState', | ||
); | ||
expect(exports.getState()).toBe(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this would fail before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great catch!
@tjenkinson I am currently facing this issue that any idea in which release this fix will be included? |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
jest.isolateModulesAsync
currently doesn't work asthis
is not bound to the correct object.this._isolatedModuleRegistry
on the actual instance doesn't get set soisolateModulesAsync
is essentially a no-op.Test plan
Added a new test that fails without the fix.