module.exports = { preset: 'ts-jest', testEnvironment: 'node', testMatch: ['/tests/integration/**/*.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/integration', 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'], setupFiles: ['/tests/integration/setup/env.setup.ts'], globalSetup: '/tests/integration/setup/globalSetup.ts', testTimeout: 20000 };