import type { Config } from 'jest'; import { config as dotEnvConfig } from 'dotenv'; /** * Loads shared integration defaults via `jest.config.export.js` (see CMP root comment: * Jest configs that can't reliably import `jest.config.ts`). */ // eslint-disable-next-line @typescript-eslint/no-var-requires -- CJS bridge at repo root const { defaultIntegrationConfig } = require('../../jest.config.export.js') as { defaultIntegrationConfig: Config; }; dotEnvConfig(); /** Drop `testRegex` so we can set `testMatch` — Jest disallows both. */ const { testRegex: _integrationTestRegex, ...integrationDefaults } = defaultIntegrationConfig; const config: Config = { ...integrationDefaults, maxWorkers: 1, rootDir: __dirname, // Positive glob only — do not pick up unit `*.spec.ts` files under this package testMatch: ['**/*.integration.spec.ts'], }; export default config;