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 --all #4020

Merged
merged 1 commit into from
Jul 14, 2017
Merged

jest --all #4020

merged 1 commit into from
Jul 14, 2017

Conversation

aaronabramov
Copy link
Contributor

depends on: #4012
the code is in the last commit

@@ -492,6 +492,10 @@ function normalize(options: InitialOptions, argv: Argv) {
newOptions.json = argv.json;
newOptions.lastCommit = argv.lastCommit;

if (argv.all) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Argv type should be updated with all

({stderr} = runJest(DIR, ['--all']));
expect(stderr).toMatch('PASS __tests__/file1.test.js');
expect(stderr).toMatch('PASS __tests__/file2.test.js');
expect(stderr).toMatch('PASS __tests__/file3.test.js');
Copy link
Collaborator

Choose a reason for hiding this comment

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

We could extract similar logic for this and previous test and put it in beforeEach in this describe block. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

every call to jest in this test is different though (missing -o argument)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yea, I just took a closer look.
I think we should warn about using -o together with --all

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yargs has conflicts option that i tried using for this, but then i though that it might be ok.
i think a use case of aliasing jest to something like jest --someOptions --onlyChanged
and then running it with jest --all is pretty common and --all is explicitly said to overwrite -o
but idk. @cpojer what do you think?

@codecov-io
Copy link

codecov-io commented Jul 12, 2017

Codecov Report

Merging #4020 into master will decrease coverage by <.01%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4020      +/-   ##
==========================================
- Coverage   60.39%   60.39%   -0.01%     
==========================================
  Files         196      196              
  Lines        6754     6756       +2     
  Branches        6        6              
==========================================
+ Hits         4079     4080       +1     
- Misses       2672     2673       +1     
  Partials        3        3
Impacted Files Coverage Δ
packages/jest-config/src/valid_config.js 100% <ø> (ø) ⬆️
packages/jest-config/src/normalize.js 80.97% <50%> (-0.35%) ⬇️

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 7bf328d...a1aa05b. Read the comment docs.

@cpojer
Copy link
Member

cpojer commented Jul 13, 2017

You rock.

@aaronabramov aaronabramov merged commit f1b475d into jestjs:master Jul 14, 2017
@aaronabramov aaronabramov deleted the jest_all branch July 14, 2017 15:19
description:
'The opposite of `onlyChanged`. If `onlyChanged` is set by ' +
'default, running jest with `--all` will force Jest to run all tests ' +
'instead of runnig only tests related to changed files.',
Copy link
Contributor

Choose a reason for hiding this comment

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

runnig -> running?

tushardhole pushed a commit to tushardhole/jest that referenced this pull request Aug 21, 2017
@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.

6 participants