forked from clouDr-f2e/monitor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.ts
More file actions
30 lines (29 loc) · 823 Bytes
/
jest.config.ts
File metadata and controls
30 lines (29 loc) · 823 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
29
30
/*
* For a detailed explanation regarding each configuration property and type check, visit:
* https://jestjs.io/docs/en/configuration.html
*/
export default {
collectCoverage: false,
transform: {
'^.+\\.ts$': 'ts-jest'
},
moduleFileExtensions: ['js', 'ts'],
testMatch: ['**/*.test.ts'],
testPathIgnorePatterns: ['<rootDir>/node_modules/'],
preset: 'ts-jest',
globals: {
'ts-jest': {
tsconfig: './tsconfig.json',
diagnostics: false
}
},
moduleNameMapper: {
// alias src/(.*) not work
// 从上到下优先匹配
'@/test/(.*)': '<rootDir>/test/$1',
'@zyf2e/monitor-(.*)': '<rootDir>/packages/$1/src/index'
},
globalSetup: './test/config/setup.js',
globalTeardown: './test/config/teardown.js',
testEnvironment: './test/config/puppeteerEnvironment.js'
}