-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
42 lines (41 loc) · 969 Bytes
/
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
module.exports = {
collectCoverage: true,
collectCoverageFrom: ["./src/**/*.{js,ts,tsx}", "!**/*.d.ts"],
coverageThreshold: {
global: {
branches: 70,
functions: 70,
lines: 82,
statements: 80
}
},
globals: {
"ts-jest": {
// babelConfig: true,
diagnostics: false,
isolatedModules: true,
tsconfig: "<rootDir>/tsconfig.test.json",
useESM: true
}
},
moduleDirectories: ["node_modules"],
moduleFileExtensions: ["ts", "js", "tsx"],
moduleNameMapper: {
"^@/(.*)$": "<rootDir>/src/$1",
"^lodash-es$": "lodash"
},
roots: ["<rootDir>"],
testMatch: ["<rootDir>/tests/**/*.spec.(js|jsx|ts|tsx)"],
transform: {
"\\.(ts|tsx)$": "ts-jest"
// '\\.(ts|tsx)$': 'babel-jest'
},
transformIgnorePatterns: [
"node_modules/(?!vue-router)",
"<rootDir>/node_modules/(?!(lodash-es)/.*)",
"dist",
"temp"
],
verbose: false,
extensionsToTreatAsEsm: [".ts"]
};