-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
fix: pass resolve conditions when loading stub module #15489
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: pass resolve conditions when loading stub module #15489
Conversation
✅ Deploy Preview for jestjs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
thanks, this seems like a good change 👍
In addition to the inline comments, mind adding a changelog entry?
c29e3b7
to
1accf78
Compare
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.
thanks!
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
Problem:
When stubbing the existing
node_module
package by anothernode_module
package viamoduleNameMapper
settings, theresolve conditions
are not respected. For example, in this PR, it does not resolve tobrowser
export of theexample-test-module
when the test environment isjsdom
.Solution:
Pass through the
options.conditions
field in theresolveStubModuleName
.Test plan
Demonstrated in the unit test