-
-
Notifications
You must be signed in to change notification settings - Fork 233
Expand file tree
/
Copy pathjest.config.ts
More file actions
27 lines (25 loc) · 872 Bytes
/
jest.config.ts
File metadata and controls
27 lines (25 loc) · 872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import type { JestConfigWithTsJest } from 'ts-jest';
const config: JestConfigWithTsJest = {
preset: 'ts-jest/presets/default-esm',
testEnvironment: 'node',
extensionsToTreatAsEsm: ['.ts'],
testRegex: '(/tests/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
// moduleNameMapper: {
// '^@core/(.*)$': '<rootDir>/src/$1',
// '^@services/(.*)$': '<rootDir>/src/services/$1',
// '^@interfaces/(.*)$': '<rootDir>/src/interfaces/$1',
// '^@constants/(.*)$': '<rootDir>/src/constants/$1',
// },
// transform: {
// '^.+\\.(t|j)sx?$': ['ts-jest', { useESM: true }],
// },
transform: {
'^.+\\.(t|j)sx?$': ['ts-jest', { useESM: true }],
},
testPathIgnorePatterns: ['<rootDir>/.stryker*'],
};
export default config;