/** @type {import('jest').Config} */ module.exports = { preset: 'ts-jest', testEnvironment: 'node', rootDir: '.', testMatch: ['**/*.test.ts'], testPathIgnorePatterns: ['/node_modules/', '/dist/'], moduleFileExtensions: ['ts', 'js', 'json'], transform: { '^.+\\.ts$': ['ts-jest', { tsconfig: 'tsconfig.test.json', diagnostics: { ignoreCodes: [151001, 2305, 2307, 2339, 2345, 7006] }, isolatedModules: true }] }, setupFilesAfterEnv: ['/tests/setup.ts'], globalSetup: '/tests/globalSetup.ts', globalTeardown: '/tests/globalTeardown.ts', collectCoverageFrom: [ 'src/**/*.ts', '!src/**/*.d.ts', '!src/config/**', '!src/index.ts', '!src/types/**' ], coveragePathIgnorePatterns: [ '/node_modules/', '/dist/', '/tests/', '/prisma/', '/logs/' ], coverageThreshold: { global: { branches: 50, functions: 50, lines: 50, statements: 50 }, './src/services/': { branches: 70, functions: 70, lines: 70, statements: 70 } }, coverageReporters: ['text', 'text-summary', 'lcov', 'html'], verbose: true, clearMocks: true, restoreMocks: true, maxWorkers: 1, testTimeout: 30000 };