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 projects option, rename initial config to options. #3400

Merged
merged 2 commits into from
May 2, 2017

Conversation

cpojer
Copy link
Member

@cpojer cpojer commented Apr 28, 2017

Summary

As discussed in the team meeting today, this makes the --project option work via the cli or "project" via the configuration system. It uses globs as well, so many projects can easily be specified.

I will send a follow-up PR with a test for the config option but I'm quite a bit tired right now ;)

Test plan

Add

"projects": [
  "<rootDir>"
  "<rootDir>/examples/react*",
  "<rootDir>/examples/snapshot"
],

into the top level packag.json and it will actually, really, work. Amazing.

@cpojer cpojer force-pushed the config-updates branch 2 times, most recently from d9c1c03 to db58b90 Compare April 28, 2017 10:28
let hasDeprecationWarnings;
let configs = [];
let config;
if (roots.length === 1) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just to remember, we should rename roots to projects here as this is what we pass here

)),
);
value = list;
break;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you add a test for normalizing projects?

Copy link
Collaborator

@thymikee thymikee left a comment

Choose a reason for hiding this comment

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

Looks good, left some inline comments though.

@cpojer cpojer force-pushed the config-updates branch from db58b90 to b6da783 Compare May 2, 2017 13:14
@codecov-io
Copy link

codecov-io commented May 2, 2017

Codecov Report

Merging #3400 into master will increase coverage by 0.03%.
The diff coverage is 90.32%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3400      +/-   ##
==========================================
+ Coverage   63.99%   64.02%   +0.03%     
==========================================
  Files         177      177              
  Lines        6574     6580       +6     
  Branches        5        5              
==========================================
+ Hits         4207     4213       +6     
  Misses       2365     2365              
  Partials        2        2
Impacted Files Coverage Δ
packages/jest-cli/src/TestSequencer.js 100% <ø> (ø) ⬆️
packages/jest-config/src/validConfig.js 100% <ø> (ø) ⬆️
packages/jest-cli/src/TestRunner.js 31.13% <ø> (ø) ⬆️
packages/jest-config/src/index.js 26.08% <ø> (ø) ⬆️
packages/jest-config/src/normalize.js 89.93% <90.32%> (+0.39%) ⬆️

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 26a63f4...c3598f4. Read the comment docs.

@cpojer cpojer merged commit 909da52 into jestjs:master May 2, 2017
@cpojer cpojer deleted the config-updates branch May 4, 2017 15:43
tushardhole pushed a commit to tushardhole/jest that referenced this pull request Aug 21, 2017
* Add projects option, rename initial config to options.

* Add test
@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.

4 participants