-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathjest.config.js
29 lines (28 loc) · 826 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
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: "ts-jest/presets/js-with-ts-esm",
testEnvironment: "node",
moduleDirectories: ["node_modules", "src"],
modulePathIgnorePatterns: ["testdata"],
// from https://stackoverflow.com/a/57916712/15076557
transformIgnorePatterns: [
"node_modules/(?!(sarra-canada-amqp)/)",
"node_modules/(?!(ec-weather-js)/)",
"node_modules/(?!(xml-js)/)",
],
transform: {
"^.+\\.tsx?$": ["ts-jest", { useESM: true }],
"^.+\\.ts?$": ["ts-jest", { useESM: true }],
},
collectCoverageFrom: [
"src/**/*.ts",
"!src/**/*.d.ts",
"!src/**/routeHandler.ts",
"!src/lib/logger.ts",
"!src/server.ts",
"!src/routes/**",
"!src/consts/**",
"!src/types/**",
],
watchPathIgnorePatterns: ["db/*", "cfg/*"],
};