-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
38 lines (34 loc) · 882 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
module.exports = {
// --------
// basic options
roots: ["__tests__"],
globals: {
"ts-jest": {
tsConfig: "tsconfig.json",
},
},
transform: {
"^.+\\.tsx?$": "ts-jest",
},
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$",
verbose: true,
// ------
// module resolution
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
moduleDirectories: ["./src", "./node_modules"],
modulePathIgnorePatterns: ["__data__", "__mock__"],
// --------
// coverage
collectCoverage: true,
collectCoverageFrom: [
"**/*.{js,jsx,ts,tsx}",
"!**/node_modules/**",
"!**/vendor/**",
"!**/build/**",
"!**/dist/**",
"!**/docs/**",
"!**/.vscode/**",
"!**/stories/**",
],
coverageDirectory: "./dist/coverage",
};