Skip to content

Commit

Permalink
chore: update ts-jest configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Oct 29, 2024
1 parent 7537afe commit 2d79d87
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 24 deletions.
12 changes: 6 additions & 6 deletions packages/bull/e2e/jest-e2e.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: '<rootDir>/tsconfig.spec.json',
},
],
},
testEnvironment: 'node',
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
},
},
};

export default config;
12 changes: 6 additions & 6 deletions packages/bull/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: '<rootDir>/tsconfig.spec.json',
},
],
},
testEnvironment: 'node',
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
},
},
};

export default config;
13 changes: 7 additions & 6 deletions packages/bullmq/e2e/jest-e2e.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: '<rootDir>/',
});
Expand All @@ -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: '<rootDir>/tsconfig.spec.json',
},
],
},
testEnvironment: 'node',
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
},
},
};

export default config;
12 changes: 6 additions & 6 deletions packages/bullmq/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: '<rootDir>/tsconfig.spec.json',
},
],
},
testEnvironment: 'node',
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
},
},
};

export default config;

0 comments on commit 2d79d87

Please sign in to comment.