Jest's ESM support still requires experimental flags and is fiddly with TypeScript. For a small project the fastest way out of the loop is to switch to Vitest, which is ESM-native and has a nearly identical API:
npm rm jest ts-jest babel-jest @types/jest
npm i -D vitest"scripts": { "test": "vitest run" }In the tests: jest.fn() → vi.fn(), jest.mock → vi.mock, add import { describe, it, expect, vi } from "vitest" (or set globals: true). Everything else (describe, expect, matchers) mostly works as is.
Took me 20 minutes for a 60-test project.