-
Notifications
You must be signed in to change notification settings - Fork 309
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
Huge increase in test time since upgraded to jest 24 and new preset #242
Comments
Hi, this had been addressed in #213. It is the result of switching to use AST transformer + some other things ts-jest 23.10.x does. It's most likely ts-jest issue. |
Here is a PR in From our side the newer version fixes several issues (like coverage accuracy), so we decided to publish it already. If you mostly care about speed, I personally suggest you to stay on v6 for now. If you can provide a reproduction with an especially slow component, it would enable us to do more performance testing and we could try to speed up the AST transformation done by the preset, provided the slowdown is not caused by |
There's nothing this preset can do for you in terms of performance. However expect some speedup in the next minor version of Jest (24.6 or so) as we fixed some regressions. |
@blackholegalaxy tests in my project were super slow after upgrade too, but i enabled |
This was a huge help! my unit test went from around 13 minutes to just over a minute when ran in my build pipeline on the server. |
In our case it didn't change much. 2 seconds average on a 45s run basis. The fact is with jest 24+, we have like... 10 seconds where NOTHING happens. Then tests start normally. Even with test cache enabled. |
Hi there, we have a medium sized project with around 1600 tests.
We upgraded yesterday to jest 24 with new preset, with recommended migrations changes. We use jsdom 13 as stated in the migration guide.
Please note no change was made to our project. On the same machine, here are the speed reports. It was run with
jest
alone, and reported result is the second launch of jest command (to ensure no cache problem or something like that).Before, under jest 23:
After upgrading to new preset 7.0.1 and jest 24:
Attempt with jest 24 and old 6.0.2 preset (no jsdom 13):
Please note it's especially components which encounter that problem. Our most complete component went from 2s testing under jest 23 to more than 8 sec itself alone in jest 24/preset 7.0.2.
The text was updated successfully, but these errors were encountered: