-
-
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-config] Hoist normalize
call.
#3117
Conversation
packages/jest-config/src/index.js
Outdated
} | ||
|
||
return normalize({rootDir: root}, argv); | ||
return {rootDir: root}; |
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.
return loadFromPackage(root).then(config => config || {rootDir: root})
maybe?
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.
It is done.
👍 Just curious, does it have noticeable impact on startup perf? |
I don't think so, nor can I think of any reason why it would, but maybe it should be benchmarked. |
Codecov Report
@@ Coverage Diff @@
## master #3117 +/- ##
=========================================
- Coverage 69.4% 69.4% -0.01%
=========================================
Files 156 156
Lines 5514 5504 -10
Branches 3 3
=========================================
- Hits 3827 3820 -7
+ Misses 1686 1683 -3
Partials 1 1
Continue to review full report at Codecov.
|
Sweet cleanup. |
* [jest-config] Hoist `normalize` call. * Remove unused argument. * Simplify return. * Pass `argv` to `normalize`.
* [jest-config] Hoist `normalize` call. * Remove unused argument. * Simplify return. * Pass `argv` to `normalize`.
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
Hoists calls to
normalize
injest-config
fromreadRawConfig
,loadFromFile
, andloadFromPackage
toreadConfig
.Test plan
Two tests were deleted as they are no longer accurate, but the behavior was strictly internal in the first place.