-
-
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
Add option testSequencer
allow user use custom sequencer.
#8223
Conversation
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.
Thanks, this looks great! Left some inline comments, but overall this looks awesome.
Mind updating the changelog in addition to addressing inline comments?
Codecov Report
@@ Coverage Diff @@
## master #8223 +/- ##
==========================================
+ Coverage 62.27% 62.35% +0.08%
==========================================
Files 265 265
Lines 10573 10560 -13
Branches 2572 2566 -6
==========================================
+ Hits 6584 6585 +1
+ Misses 3399 3387 -12
+ Partials 590 588 -2
Continue to review full report at Codecov.
|
Should we provide a package/api like |
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.
What @SimenB said, plus a bunch of nits :)
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.
Thanks a lot @WeiAnAn! I left a few nits.
Co-Authored-By: WeiAnAn <[email protected]>
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.
Thank you for the great work here!
We've released 24.6, so could you merge in master, and ensure version numbers are correct and that the changelog entries are in the correct place? Happy to merge after that!
Merge 24.6 and update version number to 24.6.0. |
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.
Sort test path alphabetically | ||
|
||
```js | ||
const Sequencer = require('@jest/test-sequencer').default; |
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.
This could do import Sequencer from '@jest/test-sequencer';
instead to avoid the .default
part. Fine as-is though
Thanks @WeiAnAn! |
@@ -71,6 +71,7 @@ const defaultOptions: Config.DefaultOptions = { | |||
testRegex: [], | |||
testResultsProcessor: null, | |||
testRunner: 'jasmine2', | |||
testSequencer: '@jest/test-sequencer', |
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.
This value doesn't get fully resolved unless explicitly set, so it cannot work with PnP. It should be done like here: https://github.com/WeiAnAn/jest/blob/301a5cda50bf82617fe776938ee3fbd1c24b4a7c/packages/jest-config/src/normalize.ts#L477-L479
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 resolve it in normalize
already don't we?
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.
I'm checking, but I think it only get resolved when the testSequence
option is explicitly set - otherwise it uses the default value as-is.
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. |
Summary
This PR implement feature mention in #6194.
After some discussion, change to move
testSequencer
into individual package.Give an option like
runner
, let user can user custom sequencer to handle tests order.Test plan