-
-
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
Allow custom resolver to be used with[out] moduleNameMapper #4174
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4174 +/- ##
==========================================
+ Coverage 56.17% 56.55% +0.37%
==========================================
Files 191 191
Lines 6424 6426 +2
Branches 6 6
==========================================
+ Hits 3609 3634 +25
+ Misses 2812 2789 -23
Partials 3 3
Continue to review full report at Codecov.
|
@cpojer whats the status of this PR? Am I missing anything before it can committed? |
1 similar comment
@cpojer whats the status of this PR? Am I missing anything before it can committed? |
You'll need to rebase this diff, otherwise we'll be unable to merge it. I'm fine with these changes, and the cwd changes should fix a few other issues also. Thanks for contributing. |
…apper. Also, improve error message when moduleNameMapper doesn't resolve to a module.
rootDir was modified after initialization to be process.cwd. In case of --runInBand, The resolver was intialized before the rootDir value was altered. In case of parallel, the Resolver was initialized in each spawned process using values of rootDir after initialization. Fix is to introduce a new config.cwd option that will be set to the parent processes cwd. Adjust the console reporters to favor config.cwd over config.rootDir.
Could you try pushing to this branch again? Seems like all builds failed for some reason. |
Closing/reopening to trigger integration tests: circleci/appveyor/travis-ci |
Thanks for your contribution. This was definitely a rough edge in Jest and a missing feature for as long as |
Thanks for merging! |
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. |
Also, improve error message when moduleNameMapper doesn't resolve to a module.
Summary
This PR solves the two problems above.
Test plan
Added 2 tests. Configuration documentation were updated with new argument passed to custom resolver.