Closed stijnvanderlaan closed 4 years ago
Thanks for providing the diagnostics report. There's one thing in there that can indicate the reason of the slowness. According to the report:
fs: { numberOfFiles: 30985 },
Wallaby is watching almost 31k files in your project, it is not a typical number of source files and may cause some slowness. That's after excluding node_modules
and few other standard folders, like coverage
.
Maybe you have recently introduced some folders with many files in your project's root? If it is the case it will certainly help if you exclude those folders by adding the folders that are not your tests or JavaScript code into Jest's watchPathIgnorePatterns
setting. The best way may be to inspect your project's folders and find where are the 31 thousands of files are located.
Thanks, that seems to speed it up alot! Doesn't folders starting with a dot be excluded by default?
Doesn't folders starting with a dot be excluded by default?
Not in Jest AFAIK.
What was the folder's name? Is it specific to your project, or some generic name that we can add as a default to be ignored perhaps?
Not in Jest AFAIK.
https://jestjs.io/docs/en/configuration#watchpathignorepatterns-arraystring
Even if nothing is specified here, the watcher will ignore changes to any hidden files and directories, i.e. files and folders that begins with a dot (.).
The name of the directory is tmp
and .next
in another project.
Even if nothing is specified here, the watcher will ignore changes to any hidden files and directories, i.e. files and folders that begins with a dot (.).
Oh, ok, thanks for pointing it out. We don't follow the same rule in Wallaby for Jest integration, but I guess we should.
We'll implement the ignoring rule the same way as in Jest and will release it in one the next versions.
Thank you Artem.
Issue description or question
Tests take long time to run. Also the console output gives a lot of errors: [Error] Some long running code has been detected: one of your tests is taking more than 5000ms to execute.
I do not have a wallaby config.
I did not have this problem before I updated the license. Normal jest runs in 13 seconds and 3 seconds rerun, but wallaby runs 2.4 minute: Finished executing 134 affected test(s) in 2.4 minute(s)
Wallaby diagnostics report