Listen "The One About Slow Jest Tests"
Episode Synopsis
In this episode, we cover "Why is My Jest Test Suite So Slow" by Steven Lemon and completely nerd out on it. This one is chock-full of practical tips for improving your Jest suite time as well as your general understanding of how Jest works "under the hood".
Evan does a "Cookie Corner" and hyper-speaks through a bunch of reasons why you shouldn't use client side cookies. Joe talks about memory leaks while sounding mildly depressed, and we actually have good news this week!
Extra resources for Jest testing:
1. Use the time shell built-in for enhanced timing. time npm run <your test command> --takeyourtime
2. See this issue on why Jest workers are slow sometimes
3. See this issue on why userEvent.type is slow all the time
4. Check out this package for reporting slow individual tests
5. For finding Jest memory leaks, try node --inspect-brk --expose-gc ./node_modules/.bin/jest --runInBand --logHeapUsage
Evan does a "Cookie Corner" and hyper-speaks through a bunch of reasons why you shouldn't use client side cookies. Joe talks about memory leaks while sounding mildly depressed, and we actually have good news this week!
Extra resources for Jest testing:
1. Use the time shell built-in for enhanced timing. time npm run <your test command> --takeyourtime
2. See this issue on why Jest workers are slow sometimes
3. See this issue on why userEvent.type is slow all the time
4. Check out this package for reporting slow individual tests
5. For finding Jest memory leaks, try node --inspect-brk --expose-gc ./node_modules/.bin/jest --runInBand --logHeapUsage
More episodes of the podcast Runtime Rundown - JavaScript and Web Development
Just Chatting
18/05/2025
Giving a Bleep About Design
10/04/2025
The Aspirin Paradox
18/03/2025
Neurodiversity & Tech With Shea Belsky
11/03/2025
Everyday Coaching with Aaron Bieber
03/03/2025
Changing Our Minds On Software Development
23/02/2025
Building Complex Software
03/02/2025
The One About Performance Reviews
19/01/2025
Should We Rewrite Our JavaScript Tooling?
26/10/2024
ZARZA We are Zarza, the prestigious firm behind major projects in information technology.