-
Notifications
You must be signed in to change notification settings - Fork 39
/
jest.config.js
44 lines (34 loc) · 1.01 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
module.exports = {
// Automatically clear mock calls and instances between every test
clearMocks: true,
coverageDirectory: "coverage",
// An array of regexp pattern strings used to skip coverage collection
coveragePathIgnorePatterns: [
"<rootDir>/node_modules/(?!@foo)"
],
// "preset": 'ts-jest',
// globals: {
// "ts-jest": {
// "tsConfig": "tsconfig.json",
// "diagnostics": true
// }
// },
moduleFileExtensions: [
"ts",
"tsx",
"js"
],
// A map from regular expressions to module names that allow to stub out resources with a single module
moduleNameMapper: {
"@/(.*)": "<rootDir>/dist/$1",
// "database": "<rootDir>/src/lib/database"
},
testEnvironment: "node",
testRegex: "(/tests/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?|js?)$",
// transform: {
// "^.+\\.(ts|tsx)$": "ts-jest"
// },
transformIgnorePatterns: [
"<rootDir>/node_modules/(?!@foo)"
]
};