TIL: Speed up jest tests

A modest speed-up for ts-jest

Profile pictureToni Petrina
Published on 2021-07-051 min read
  • #today-i-learned
  • #jest

To speed up Jest tests paired with ts-jest, add the following to jest.config.js:

  globals: {
    "ts-jest": {
      isolatedModules: true,
    },
  },
  maxWorkers: 1,

Change code theme: