-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
test: jest improvements #4650
test: jest improvements #4650
Conversation
c5bd4a2
to
c3b6ea9
Compare
Hello! Are there any plans to go forward with this? Specifically interested in Jest upgrade, as version 26.2.0 addresses significant issue with Posix |
Yep, I'll finish this PR today, sorry for the delay! |
86d0ece
to
a2e8760
Compare
Re: #4650 (comment) Upgraded the Babel deps, not sure whether it actually improves perf since the results are within the margin of error (both positive and negative). |
I ended up using 2 shards for the @arcanis I think you have to update the protected branch settings to take into account the new check names since the old checks are still reported as |
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.
Excellent! 🎉
* chore: upgrade to jest 27 * chore: upgrade to jest 28 * refactor: don't specify modern timers since they're the new default * test: fix tests on windows * chore: update babel * ci: use shards * ci: try different shard configuration * style: tweak configuration (cherry picked from commit b6273b3)
What's the problem this PR addresses?
This PR gradually upgrades Jest, enables some new features, and tries to improve the performance of running the test suites.
It's a draft because I want to gradually see how each improvement affects things (e.g. the speedup brought by upgrading to Jest 27, then the one brought by upgrading to Jest 28, then the one by enabling shards and so on).Closes #4676.
How did you fix it?
modern
timers since they're the new defaultAbandoned ideas:
jest-esbuild
), takes around29m
on ubuntu instead of14m
test.concurrent
: It's very buggy, doesn't properly support snapshots, and our tests are currently written in a way that assumes sequential execution (setPackageWhitelist
andstartRegistryRecording
use non-atomic global mutable state). In any case,test.concurrent
doesn't seem to help that much on CI, since we already use--maxWorkers=100%
, and eachrun
call spawns a new process on a different thread. Because of this,test.concurrent
is much more useful when running a single test file at a time.Checklist