-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
27 lines (23 loc) · 805 Bytes
/
Copy pathjest.config.js
File metadata and controls
27 lines (23 loc) · 805 Bytes
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
const nextJest = require("next/jest");
const createJestConfig= nextJest({
dir: "./"
});
const customJestConfig = {
moduleDirectories: ["node_modules",'<rootDir>/'],
testEnvironment: 'jest-environment-jsdom',
moduleNameMapper: {
"^@/core(.*)$": "<rootDir>/src/core$1",
"^@/components(.*)$": "<rootDir>/src/components$1",
"^@/data(.*)$": "<rootDir>/src/data/$1",
"^@/layouts(.*)$": "<rootDir>/src/layouts$1",
"^@/lib(.*)$": "<rootDir>/src/lib$1",
"^@/styles(.*)$": "<rootDir>/src/styles$1",
"^@/types(.*)$": "<rootDir>/src/types$1",
},
"collectCoverage": true,
"collectCoverageFrom": ["./src/**"],
"coverageThreshold": {
"lines": 90
}
}
module.exports = createJestConfig(customJestConfig);