-
Notifications
You must be signed in to change notification settings - Fork 5
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
248/test sequencer #497
248/test sequencer #497
Conversation
…directs to a new page
… before the tests complete
…ests run alphabetically + --runInBand in the package.json file to make them run sequentially
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 @SimaoBolota-MetaCell, dropped a few questions
|
||
class CustomSequencer extends Sequencer { | ||
// /** | ||
// * Select tests for shard requested via --shard=shardIndex/shardCount |
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 is sharding and why is this part commented?
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.
From my understanding sharding allows for a test suite to be split into arbitrary chunks. It's useful for lengthy test suites, not the case here. Then tests are identified via shardIndex/shardCount.
I left the sharding commented since it was part of the TestSequencer code in the Jest docs. Since the tests aren't being split using shard flag when I ran the tests with or without the sharding section, everything worked as intended.
FYI - Info that I found on sharding:
* Sort test to determine order of execution | ||
* Sorting is applied after sharding | ||
*/ | ||
sort(tests) { |
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.
Are tests sorted alphabetically?
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.
Yes they are sorted alphabetically. The default sort order is ascending, built upon converting the elements into strings so it works as well if the tests are numbered.
Implemented solution: The objective was
Sanity checks:
Breaking changes (select one):
breaking-change
Possible deployment updates issues (select one):
alert:deployment
Test coverage (select one):
Documentation (select one):
Nice to have (if relevant):