diff --git a/features/marketplace/backend-api/jest.config.cjs b/features/marketplace/backend-api/jest.config.cjs index 18d31b3b3..e1e386f6a 100755 --- a/features/marketplace/backend-api/jest.config.cjs +++ b/features/marketplace/backend-api/jest.config.cjs @@ -26,6 +26,7 @@ module.exports = { '^@lilith/typeorm-entities$': '/__mocks__/@lilith/typeorm-entities.ts', '^@lilith/service-addresses$': '/__mocks__/@lilith/service-addresses.ts', '^@lilith/domain-events$': '/__mocks__/@lilith/domain-events.ts', + '^@lilith/service-registry$': '/__mocks__/@lilith/service-registry.ts', // Mock BullMQ to prevent Worker initialization in tests '^@nestjs/bullmq$': '/__mocks__/@nestjs/bullmq.ts', }, diff --git a/features/profile/backend-api/jest.config.cjs b/features/profile/backend-api/jest.config.cjs new file mode 100644 index 000000000..8c1c8ba92 --- /dev/null +++ b/features/profile/backend-api/jest.config.cjs @@ -0,0 +1,26 @@ +/** @type {import('jest').Config} */ +module.exports = { + moduleFileExtensions: ['js', 'json', 'ts'], + rootDir: '.', + testRegex: '.*\\.(spec|e2e-spec)\\.ts$', + transform: { + '^.+\\.(t|j)s$': ['ts-jest', { + useESM: false, + tsconfig: { + module: 'commonjs', + esModuleInterop: true, + }, + }], + }, + collectCoverageFrom: ['src/**/*.(t|j)s'], + coverageDirectory: './coverage', + testEnvironment: 'node', + roots: ['/src/'], + moduleNameMapper: { + // Internal path aliases (from tsconfig.json) + '^@/(.*)$': '/src/$1', + }, + transformIgnorePatterns: [ + 'node_modules/(?!(@lilith)/)', + ], +};