forked from expressots/expressots
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.ts
34 lines (32 loc) · 1009 Bytes
/
jest.config.ts
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
import type { JestConfigWithTsJest } from "ts-jest";
const config: JestConfigWithTsJest = {
testEnvironment: "node",
roots: ["<rootDir>/packages/core/src"],
testRegex: ".*\\.spec\\.ts$",
testPathIgnorePatterns: ["/node_modules/", "/lib/"],
collectCoverageFrom: [
"packages/core/src/**/*.ts",
"!**/*.spec.ts",
"!packages/core/src/**/index.ts",
"!packages/core/src/di/**/*.ts",
"!packages/core/src/middleware/**/*.ts",
"!packages/core/src/application/application.types.ts",
"!packages/core/src/provider/dto-validator/package-resolver.ts",
],
moduleNameMapper: {
"^@src/(.*)$": "<rootDir>/packages/core/src/$1",
"^express$":
"<rootDir>/packages/core/src/middleware/middleware-service.early.spec/__mocks__/express.js",
},
setupFiles: ["reflect-metadata"],
transform: {
"^.+\\.ts$": [
"ts-jest",
{
tsconfig: "tsconfig.base.json",
// Add any ts-jest specific options here
},
],
},
};
export default config;