Make your Jest Tests upto 10x faster with these tips. Make sure most of your tests are around 100ms or below. The slowest ones could max 300ms. Switch to yarn + Node V16 + Jest 28.2 + NodeJS. Use MaxWorkers=50% to get the optimal performance.
Table of contents
π Make your Jest Tests upto 10x Faster# 1 Making network calls inside the Tests#2 There could be more than just network calls.#3 Using MaxWorkers=50% to get the optimal performance.#4 Switch to yarn + Node V16 + Jest 28#4 Fix slowest test cases#5 Switch to swc/jest for incredible performance boost.#6 Memory Leaks#6 React testing library#7 AdditionalImpact1 Comment
Sort: