Jest ESM — Total Guide To More Than 100% Faster Testing For Angular⚡
Let’s learn how to speed up our Angular Jest tests by more than 100% by switching to Jest ESM (a notoriously problematic migration) and how to solve all the troublesome issues that tend to pop up along the way!
In my case, the final speed up was close to 290% from 50 seconds to only 17 seconds which is a huge win!
Jest is by far the most popular frontend test runner and for a good reason!
Jest runs tests in parallel and we can even specify how many workers should be used to match the cores of our machine, which makes it really fast!
For these reasons, Jest became the go to replacement for the Karma test runner which comes out of the box in Angular CLI workspaces.
This article focuses on Jest ESM integration in standard Angular CLI workspaces using plain
jest
together withjest-preset-angular
. There…