forked from zwave-js/node-zwave-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
30 lines (30 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
module.exports = {
testEnvironment: "node",
testRegex: "(\\.|/)test\\.tsx?$",
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
modulePathIgnorePatterns: [
// TODO: Add those packages that have been migrated to ava
"<rootDir>/packages/shared",
"<rootDir>/packages/core",
"<rootDir>/packages/nvmedit",
],
moduleNameMapper: {
// Somehow the testing module isn't found automatically 🤷♂️
"^@zwave-js/testing(.*)": "<rootDir>/packages/testing/src$1",
},
globalSetup: "./test/jest.globalSetup.ts",
setupFilesAfterEnv: ["jest-extended/all"],
setupFiles: ["reflect-metadata", "./test/jest.setup.js"],
sandboxInjectedGlobals: ["Reflect"],
collectCoverage: false,
collectCoverageFrom: [
"packages/**/src/**/*.ts",
"!packages/**/src/**/*.test.ts",
],
coverageReporters: ["lcov", "html", "text-summary"],
transform: {
"^.+\\.tsx?$": "babel-jest",
},
// Help jest resolve the compiled files which are referenced inside publishConfig
resolver: "./test/jest.moduleResolver.js",
};