forked from zwave-js/node-zwave-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
35 lines (35 loc) · 1.21 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
module.exports = {
testEnvironment: "node",
roots: [
"<rootDir>/packages/config/src",
"<rootDir>/packages/core/src",
"<rootDir>/packages/serial/src",
"<rootDir>/packages/shared/src",
"<rootDir>/packages/testing/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(.*)": "<rootDir>/packages/config/src$1",
"^@zwave-js/core(.*)": "<rootDir>/packages/core/src$1",
"^@zwave-js/maintenance(.*)": "<rootDir>/packages/maintenance/src$1",
"^@zwave-js/serial(.*)": "<rootDir>/packages/serial/src$1",
"^@zwave-js/shared(.*)": "<rootDir>/packages/shared/src$1",
"^@zwave-js/testing(.*)": "<rootDir>/packages/testing/src$1",
},
globalSetup: "./test/jest.globalSetup.ts",
setupFilesAfterEnv: ["jest-extended"],
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",
},
};