const { pathsToModuleNameMapper } = require('ts-jest'); const { compilerOptions } = require('./tsconfig'); module.exports = { preset: 'ts-jest', testEnvironment: 'jsdom', setupFilesAfterEnv: ['/jest.setup.js'], moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, { prefix: '/' }), testMatch: [ '**/__tests__/**/*.(ts|tsx|js)', '**/*.(test|spec).(ts|tsx|js)', ], transform: { '^.+\\.(ts|tsx)$': 'ts-jest', }, }