diff --git a/packages/bull/e2e/jest-e2e.config.ts b/packages/bull/e2e/jest-e2e.config.ts index 747f1491..52fc3b2a 100644 --- a/packages/bull/e2e/jest-e2e.config.ts +++ b/packages/bull/e2e/jest-e2e.config.ts @@ -12,14 +12,14 @@ const config: Config.InitialOptions = { testRegex: '/e2e/.*\\.(e2e-test|e2e-spec).(ts|tsx|js)$', moduleNameMapper, transform: { - '^.+\\.(t|j)s$': 'ts-jest', + '^.+\\.(t|j)s$': [ + 'ts-jest', + { + tsconfig: '/tsconfig.spec.json', + }, + ], }, testEnvironment: 'node', - globals: { - 'ts-jest': { - tsconfig: '/tsconfig.spec.json', - }, - }, }; export default config; diff --git a/packages/bull/jest.config.ts b/packages/bull/jest.config.ts index aa342f75..9665ace1 100644 --- a/packages/bull/jest.config.ts +++ b/packages/bull/jest.config.ts @@ -12,14 +12,14 @@ const config: Config.InitialOptions = { testRegex: '/lib/.*\\.(test|spec).(ts|tsx|js)$', moduleNameMapper, transform: { - '^.+\\.(t|j)s$': 'ts-jest', + '^.+\\.(t|j)s$': [ + 'ts-jest', + { + tsconfig: '/tsconfig.spec.json', + }, + ], }, testEnvironment: 'node', - globals: { - 'ts-jest': { - tsconfig: '/tsconfig.spec.json', - }, - }, }; export default config; diff --git a/packages/bullmq/e2e/jest-e2e.config.ts b/packages/bullmq/e2e/jest-e2e.config.ts index 747f1491..c9da1d48 100644 --- a/packages/bullmq/e2e/jest-e2e.config.ts +++ b/packages/bullmq/e2e/jest-e2e.config.ts @@ -2,6 +2,7 @@ import type { Config } from '@jest/types'; import { pathsToModuleNameMapper } from 'ts-jest'; import { compilerOptions } from '../tsconfig.spec.json'; +// Map TypeScript paths to module name mapper const moduleNameMapper = pathsToModuleNameMapper(compilerOptions.paths, { prefix: '/', }); @@ -12,14 +13,14 @@ const config: Config.InitialOptions = { testRegex: '/e2e/.*\\.(e2e-test|e2e-spec).(ts|tsx|js)$', moduleNameMapper, transform: { - '^.+\\.(t|j)s$': 'ts-jest', + '^.+\\.(t|j)s$': [ + 'ts-jest', + { + tsconfig: '/tsconfig.spec.json', + }, + ], }, testEnvironment: 'node', - globals: { - 'ts-jest': { - tsconfig: '/tsconfig.spec.json', - }, - }, }; export default config; diff --git a/packages/bullmq/jest.config.ts b/packages/bullmq/jest.config.ts index aa342f75..9665ace1 100644 --- a/packages/bullmq/jest.config.ts +++ b/packages/bullmq/jest.config.ts @@ -12,14 +12,14 @@ const config: Config.InitialOptions = { testRegex: '/lib/.*\\.(test|spec).(ts|tsx|js)$', moduleNameMapper, transform: { - '^.+\\.(t|j)s$': 'ts-jest', + '^.+\\.(t|j)s$': [ + 'ts-jest', + { + tsconfig: '/tsconfig.spec.json', + }, + ], }, testEnvironment: 'node', - globals: { - 'ts-jest': { - tsconfig: '/tsconfig.spec.json', - }, - }, }; export default config;