-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
37 lines (37 loc) · 1004 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
/** @type {import('@ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
preset: "ts-jest",
testEnvironment: "jsdom",
setupFilesAfterEnv: ["jest-27-expect-message"],
moduleNameMapper: {
"src/(.*)": "<rootDir>/src/$1",
},
collectCoverageFrom: ["src/**/*.ts*"],
moduleFileExtensions: ["js", "jsx", "ts", "tsx", "json", "node", "d.ts"],
roots: ["<rootDir>/src/", "<rootDir>/tests/"],
coveragePathIgnorePatterns: [
"/node_modules/",
"src/lang/locale/",
"src/constants",
"src/icons",
"src/declarations.d.ts",
],
coverageDirectory: "coverage",
maxWorkers: 1,
globals: {
"ts-jest": {
isolatedModules: true
}
},
transform: {
"\\.[jt]sx?$": "ts-jest",
},
snapshotFormat: {
escapeString: true,
printBasicPrototype: false,
callToJSON: true,
},
"transformIgnorePatterns": [
"node_modules/(?!(nanoid)/)"
]
};