TLDR Dev · QUICK LINKS
FIX FLAKY JEST TESTS IN CI WITH MAXWORKERS (AND WHY IT WORKS)
Summary from the TLDR Dev newsletter
Flaky Jest tests in CI are usually a memory problem, not a code problem, so setting --maxWorkers='50%' caps workers at half the available CPU cores and largely eliminates the issue.