-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjest.config.js
46 lines (35 loc) · 1 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
// For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html
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)"
],
globals: {
"ts-jest": {
"tsConfigFile": "tsconfig.json",
"enableTsDiagnostics": 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>/src/$1",
"database": "<rootDir>/src/lib/database"
},
testEnvironment: "node",
testRegex: "(/tests/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
transform: {
"^.+\\.(ts|tsx)$": "ts-jest"
},
transformIgnorePatterns: [
"<rootDir>/node_modules/(?!@foo)"
]
};