-
-
Notifications
You must be signed in to change notification settings - Fork 919
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
this package was slowing down my jest tests #1114
Comments
Please provide a minimal test suite where this issue is present. |
Sorry I can't spend more time on this by recreating a repo. But I can share the code change that has fixed my problem. Now my jest runs in 10 seconds instead of 200 seconds. I was using version 6.2.0, I have also tried upgrading to the latest 7.3.0 but the problem was still there. Only removing it helped. |
Try |
I can verify that this sped up my tests a lot in some cases |
I've isolated my tests slowdown to Faker too.
The require takes on average 1.6s on 2019 MacBook Pro
Changing the import to |
Team decision We should amend the readme usage section to contain a hint why the user should use a locale specific variant. The docs should also mention it in the usage section ( locale specific versions ). Also the downsides of the the locale specific versions might need some documentation. |
Hello, I am willing to start updating the documentation relating to this issue! If you do not mind, I would like to be assigned to this issue. |
Thanks for your help. |
Note that we already have a page partially mentioning this, but the main usage page might need a hint for this as well and the localization page might need some more details. |
I have been debugging my jest tests all day because they were failing due to timeouts, and sometimes passing but it took like 200 seconds sometimes to run few simple tests. Long story short, I have disabled creating my random mock data with faker and used hard-coded data instead. Now my jest runs in few seconds.
Note that it was not slowing down particular unit tests (they took few milliseconds), but the whole jest runtime took over hundreds of seconds. So it does not play nice with jest runner or whatever on windows 10 and also WSL.
The text was updated successfully, but these errors were encountered: