module.exports = { preset: 'ts-jest', testEnvironment: 'node', testMatch: ['/tests/unit/**/*.test.ts'], // Separate directory per suite: jest writes coverage/lcov.info by default, so // running unit and integration in the same job would have the second silently // overwrite the first. SonarQube is pointed at both and merges them. coverageDirectory: '/coverage/unit', coverageReporters: ['lcov', 'text-summary'], // Every source file, not just the ones a test happens to import — otherwise an // entirely untested file is absent from the report rather than reported as 0%, // which flatters the total. collectCoverageFrom: ['/src/**/*.ts'] };