Skip to content
The One About Slow Jest Tests episode artwork

Feb 3, 2023 1 hr 6 min

The One About Slow Jest Tests

from Runtime Rundown - JavaScript and Web Development Hosted by Joe Boyle and Evan Cooper

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

Episode details come from the podcast's RSS feed.

Embed this episode

Ready to play

The One About Slow Jest Tests

0:00 1:06:53

No transcript yet.

Requests help us decide what to transcribe next.

Frequently asked questions

How long is this episode of Runtime Rundown - JavaScript and Web Development?

This episode is 1 hour and 6 minutes long.

When was this Runtime Rundown - JavaScript and Web Development episode published?

This episode was published on February 3, 2023.

Can I download this Runtime Rundown - JavaScript and Web Development episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.