2

Running Jest (via NPM global install or through a project's node_module binary) takes 5 minutes. To be specific, I'm talking about the time it takes from running jest until the point where it begins to show the test files.

The strange part is that this only seems to happen on the specific model of Mac I'm using (2019 16" MacBook Pro), as it happens to one of my coworkers as well who is on the same model. It didn't happen on my previous computer (2019 15" MacBook Pro), nor does it happen on any of my other coworkers' machines (various 2018-2022 MBPs).

The issue happens with any run of jest, not linked to any specific repo.

I've searched for related threads but only seem to be able to locate issues specific to optimizing tests, not with Jest as a whole.

Nathanael
  • 954
  • 3
  • 19
  • 39

1 Answers1

-1

Try adding the flag --maxWorkers=1 to the script you run

James Begg
  • 132
  • 3