/** * Jest Configuration for MPC Service Tests */ module.exports = { moduleFileExtensions: ['js', 'json', 'ts'], rootDir: '..', testEnvironment: 'node', transform: { '^.+\\.(t|j)s$': 'ts-jest', }, collectCoverageFrom: [ 'src/**/*.(t|j)s', '!src/**/*.module.ts', '!src/main.ts', '!src/**/*.dto.ts', '!src/**/*.interface.ts', ], coverageDirectory: './coverage', coverageReporters: ['text', 'lcov', 'html'], coverageThreshold: { global: { branches: 70, functions: 70, lines: 70, statements: 70, }, }, moduleNameMapper: { '^@/(.*)$': '/src/$1', '^@domain/(.*)$': '/src/domain/$1', '^@application/(.*)$': '/src/application/$1', '^@infrastructure/(.*)$': '/src/infrastructure/$1', '^@api/(.*)$': '/src/api/$1', '^@shared/(.*)$': '/src/shared/$1', '^@config/(.*)$': '/src/config/$1', }, testPathIgnorePatterns: ['/node_modules/', '/dist/'], setupFilesAfterEnv: ['/tests/setup.ts'], verbose: true, testTimeout: 30000, };