Skip to content
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

Merged
merged 4 commits into from
Mar 10, 2017
Merged

[jest-config] Hoist normalize call. #3117

merged 4 commits into from
Mar 10, 2017

Conversation

wtgtybhertgeghgtwtg
Copy link
Contributor

Summary
Hoists calls to normalize in jest-config from readRawConfig, loadFromFile, and loadFromPackage to readConfig.

Test plan
Two tests were deleted as they are no longer accurate, but the behavior was strictly internal in the first place.

}

return normalize({rootDir: root}, argv);
return {rootDir: root};
Copy link
Collaborator

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is done.

@thymikee
Copy link
Collaborator

👍 Just curious, does it have noticeable impact on startup perf?

@wtgtybhertgeghgtwtg
Copy link
Contributor Author

I don't think so, nor can I think of any reason why it would, but maybe it should be benchmarked.

@codecov-io
Copy link

Codecov Report

Merging #3117 into master will decrease coverage by <.01%.
The diff coverage is 33.33%.

@@            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
Impacted Files Coverage Δ
packages/jest-config/src/loadFromFile.js 100% <100%> (ø)
packages/jest-config/src/loadFromPackage.js 100% <100%> (ø)
packages/jest-config/src/index.js 25% <14.28%> (-10.72%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a8c0a47...5f896da. Read the comment docs.

@cpojer cpojer merged commit bb33afc into jestjs:master Mar 10, 2017
@cpojer
Copy link
Member

cpojer commented Mar 10, 2017

Sweet cleanup.

@wtgtybhertgeghgtwtg wtgtybhertgeghgtwtg deleted the hoist-normalize branch March 10, 2017 12:08
skovhus pushed a commit to skovhus/jest that referenced this pull request Apr 29, 2017
* [jest-config] Hoist `normalize` call.

* Remove unused argument.

* Simplify return.

* Pass `argv` to `normalize`.
tushardhole pushed a commit to tushardhole/jest that referenced this pull request Aug 21, 2017
* [jest-config] Hoist `normalize` call.

* Remove unused argument.

* Simplify return.

* Pass `argv` to `normalize`.
@github-actions
Copy link

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.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants