-
Notifications
You must be signed in to change notification settings - Fork 2
/
jest.config.js
61 lines (58 loc) · 1.46 KB
/
jest.config.js
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
const path = require('path');
global.requestAnimationFrame = (callback) => {
return setTimeout(callback, 0);
};
global.cancelAnimationFrame = (num) => {
return clearTimeout(num);
};
module.exports = {
// 用于 Jest 忽略 SCSS 文件
// process(src, filename) {
// return 'module.exports = ' + JSON.stringify(path.basename(filename)) + ';';
// },
"verbose": true,
"setupFiles": [
"<rootDir>/jest.config.js",
],
"globals": {
"ts-jest": {
"tsConfigFile": "./test/tsconfig.json"
}
},
"transform": {
"^.+\\.tsx?$": "<rootDir>/node_modules/ts-jest/preprocessor.js",
"^.+\\.ts?$": "ts-jest",
"^.+\\.css?$": "<rootDir>/jest.config.js",
"^.+\\.svg?$": "<rootDir>/jest.config.js"
},
"testRegex": "./test/.*\\.test\\.ts",
// "(server/__test__/.*\\.(test|spec))\\.(tsx?|jsx?|ts?|js?)$",
// "moduleNameMapper": {
// "@server/util/util": "<rootDir>/src/server/__test__/util",
// "@server/(.*)": "<rootDir>/src/server/$1"
// },
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"json",
"jsx"
],
//"collectCoverage": true,
//"mapCoverage": true,
"modulePathIgnorePatterns": [
"./test/resources/fe.retail-admin"
],
// "collectCoverageFrom": [
// //"src/client/*.{ts,tsx}",
// "src/server/route/**/*.{ts,tsx}",
// "!**/node_modules/**",
// "!**/vendor/**",
// "!src/**/*.d.ts"
// ],
// "coverageReporters": [
// "lcov",
// "text",
// "text-summary"
// ]
};