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

Add readConfigs method to jest-config #7096

Merged
merged 1 commit into from
Oct 10, 2018

Conversation

rubennorte
Copy link
Contributor

@rubennorte rubennorte commented Oct 3, 2018

Summary

This just moves the method to get the normalized configuration from the command line args and the project list to jest-config.

Test plan

Added a smoke test in jest-config (just like we did for readConfig) and the current tests for jest-cli should still pass.

@codecov-io
Copy link

Codecov Report

Merging #7096 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7096      +/-   ##
==========================================
- Coverage   66.67%   66.66%   -0.01%     
==========================================
  Files         253      253              
  Lines       10597    10597              
  Branches        3        3              
==========================================
- Hits         7066     7065       -1     
- Misses       3530     3531       +1     
  Partials        1        1
Impacted Files Coverage Δ
...ckages/jest-cli/src/reporters/coverage_reporter.js 66.92% <0%> (-0.79%) ⬇️

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 ec382f5...1d465a5. Read the comment docs.

@rubennorte rubennorte requested a review from SimenB October 3, 2018 17:15
@SimenB
Copy link
Member

SimenB commented Oct 3, 2018

Would this make sense as en export from jest-config?

(Changelog? :D)

@rubennorte
Copy link
Contributor Author

rubennorte commented Oct 3, 2018

@SimenB I'm not sure it'd be useful as it's not used by any other Jest package. We're good using an internal module even if we have to have special care about breaking changes on it.

Also I don't think it'd feel natural to have an exported function in the package that represents the CLI.

Edit: I didn't read properly that you meant the "jest-config" package. I'll explore if it fits there nicely.

@SimenB
Copy link
Member

SimenB commented Oct 4, 2018

Yeah, jest-config is already pretty internal to jest (the reusable parts of the way we do config is in jest-validate)

@rubennorte rubennorte changed the title Extract getConfigs method from jest-cli index file Add readConfigs method to jest-config Oct 10, 2018
@rubennorte
Copy link
Contributor Author

@SimenB moved to jest-config. After removing the error reporting to outputStream it totally made sense. Thanks for the suggestion!

@rubennorte rubennorte merged commit b4d9ed8 into jestjs:master Oct 10, 2018
@rubennorte rubennorte deleted the extract-get-configs-method branch October 10, 2018 23:05
@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 12, 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.

4 participants