/** @type {import('jest').Config} */ module.exports = { moduleFileExtensions: ['js', 'json', 'ts'], rootDir: '.', testRegex: 'test/.*\\.spec\\.ts$', transform: { '^.+\\.ts$': ['ts-jest', { tsconfig: 'test/tsconfig.json' }], }, moduleNameMapper: { '^jsdom$': '/test/__mocks__/jsdom.ts', '^playwright$': '/test/__mocks__/playwright.ts', '^@mozilla/readability$': '/test/__mocks__/readability.ts', }, testEnvironment: 'node', // Each suite builds a full Nest app in beforeAll. That takes well under a // second on an idle machine, but several seconds when every suite starts at // once on a busy CI runner, past Jest's default 5 s. testTimeout: 30_000, };