module.exports = { preset: 'ts-jest', testEnvironment: 'jsdom', roots: ['/src'], testMatch: ['**/__tests__/**/*.test.ts', '**/__tests__/**/*.test.tsx'], moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'], setupFilesAfterEnv: ['/src/__tests__/setup.ts'], moduleNameMapper: { '^@/(.*)$': '/src/$1', }, collectCoverageFrom: [ 'src/**/*.{ts,tsx}', '!src/**/*.d.ts', '!src/__tests__/**', '!src/index.tsx', '!src/App.tsx', ], coverageThreshold: { global: { branches: 30, functions: 30, lines: 30, statements: 30, }, }, transform: { '^.+\\.tsx?$': ['ts-jest', { tsconfig: { jsx: 'react-jsx', esModuleInterop: true, }, }], }, };