-
-
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 --all #4020
jest --all #4020
Conversation
@@ -492,6 +492,10 @@ function normalize(options: InitialOptions, argv: Argv) { | |||
newOptions.json = argv.json; | |||
newOptions.lastCommit = argv.lastCommit; | |||
|
|||
if (argv.all) { |
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.
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'); |
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.
We could extract similar logic for this and previous test and put it in beforeEach
in this describe block. What do you think?
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.
every call to jest in this test is different though (missing -o
argument)
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.
Yea, I just took a closer look.
I think we should warn about using -o
together with --all
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.
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 Report
@@ 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
Continue to review full report at Codecov.
|
You rock. |
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.', |
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.
runnig -> running?
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. |
depends on: #4012
the code is in the last commit