-
Notifications
You must be signed in to change notification settings - Fork 956
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: After an investigation of why does jest take up to 15 seconds to start running some tests there isn't a fix for the main issue, but a few improvements, specifically * ~~Jest now uses swc to compile test code. I initially tried running ts-jest in compile only mode, then to use esbuild as we already use it but it modifies order of imports an puts jest mocks after imports which breaks tests. In the end I settled for swc which worked and got a reasonable improvement. Ideally we would run this agains all tsx files. We can do that once there won't be a need for a transformation of fb-stubs paths.~~ * Disable type checking as a part of test run * Jest ignores files in /lib/ where we store compiled typescript * Set max workers to 8. I have tried running tests locally and on devvm with 128 cpus and I found that having 8 workers is optimal. Not sure exactly why but this resulted in faster runs. * Found a couple tests that leave hanging promises. Marked, not fixed. As a result the full run went down from ~85s to ~65s on my mac studio measured with warm runs of `TZ=Pacific/Pohnpei node_modules/.bin/jest` allow-large-files Reviewed By: lblasa Differential Revision: D60059552 fbshipit-source-id: 04fbcd03c8626c772c7fd446263c24d0fb3b7c71
- Loading branch information
1 parent
8d86110
commit 240ff9d
Showing
10 changed files
with
56 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters