forked from zwave-js/node-zwave-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
51 lines (51 loc) · 2.12 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
47
48
49
50
51
module.exports = {
testEnvironment: "node",
roots: [
"<rootDir>/packages/config/src",
"<rootDir>/packages/core/src",
"<rootDir>/packages/nvmedit/src",
"<rootDir>/packages/serial/src",
"<rootDir>/packages/shared/src",
"<rootDir>/packages/testing/src",
"<rootDir>/packages/transformers/src",
"<rootDir>/packages/zwave-js/src",
],
testRegex: "(\\.|/)test\\.tsx?$",
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
moduleNameMapper: {
"^@zwave-js/(.*)/package.json": "<rootDir>/packages/$1/package.json",
"^@zwave-js/config/safe": "<rootDir>/packages/config/src/index_safe",
"^@zwave-js/config(.*)": "<rootDir>/packages/config/src$1",
"^@zwave-js/core/safe": "<rootDir>/packages/core/src/index_safe",
"^@zwave-js/core(.*)": "<rootDir>/packages/core/src$1",
"^@zwave-js/nvmedit/safe": "<rootDir>/packages/nvmedit/src/index_safe",
"^@zwave-js/nvmedit(.*)": "<rootDir>/packages/nvmedit/src$1",
"^@zwave-js/maintenance/safe":
"<rootDir>/packages/maintenance/src/index_safe",
"^@zwave-js/maintenance(.*)": "<rootDir>/packages/maintenance/src$1",
"^@zwave-js/serial/safe": "<rootDir>/packages/serial/src/index_safe",
"^@zwave-js/serial(.*)": "<rootDir>/packages/serial/src$1",
"^@zwave-js/shared/safe": "<rootDir>/packages/shared/src/index_safe",
"^@zwave-js/shared(.*)": "<rootDir>/packages/shared/src$1",
"^@zwave-js/testing/safe": "<rootDir>/packages/testing/src/index_safe",
"^@zwave-js/testing(.*)": "<rootDir>/packages/testing/src$1",
"^@zwave-js/transformers/safe":
"<rootDir>/packages/transformers/src/index_safe",
"^@zwave-js/transformers(.*)": "<rootDir>/packages/transformers/src$1",
},
globalSetup: "./test/jest.globalSetup.ts",
setupFilesAfterEnv: ["jest-extended/all"],
setupFiles: ["reflect-metadata", "./test/jest.setup.js"],
extraGlobals: ["Reflect"],
collectCoverage: false,
collectCoverageFrom: [
"packages/**/src/**/*.ts",
"!packages/**/src/**/*.test.ts",
],
coverageReporters: ["lcov", "html", "text-summary"],
transform: {
"^.+\\.tsx?$": "babel-jest",
},
// Place snapshots next to test files
snapshotResolver: "<rootDir>/test/jest.snapshotResolver.js",
};