-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathjest.config.js
More file actions
28 lines (27 loc) · 901 Bytes
/
Copy pathjest.config.js
File metadata and controls
28 lines (27 loc) · 901 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
28
/** @type {import('jest').Config} */
const config = {
preset: 'ts-jest',
moduleNameMapper: {
admin: ['<rootDir>/src/admin'],
'@services/(.*)': ['<rootDir>/src/services/$1'],
'@services': ['<rootDir>/src/services'],
'@shared/(.*)': ['<rootDir>/src/shared/$1'],
'@shared': ['<rootDir>/src/shared'],
'@web/(.*)': ['<rootDir>/web/src/$1'],
'@web': ['<rootDir>/web/src'],
},
// `isolatedModules: true` keeps ts-jest in transpile-only mode for imported
// files, so cross-package type resolution (e.g. the web tree's DOM globals
// and `@web/*` paths) does not need to be wired into the root tsconfig.
transform: {
'^.+\\.tsx?$': ['ts-jest', { isolatedModules: true }],
},
testPathIgnorePatterns: [
'<rootDir>/out/',
'<rootDir>/dist/',
'<rootDir>/venv/',
'<rootDir>/.venv/',
'/__tests__/helpers\\.ts$',
],
};
module.exports = config;