-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
29 lines (27 loc) · 971 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
import type { JestConfigWithTsJest } from "ts-jest";
import { pathsToModuleNameMapper } from "ts-jest";
import { compilerOptions } from "./tsconfig.json";
const jestConfig: JestConfigWithTsJest = {
moduleFileExtensions: ["js", "json", "ts"],
rootDir: "./src",
testRegex: ".*\\.spec\\.ts$",
transform: {
"^.+\\.(t|j)s$": "ts-jest",
},
collectCoverageFrom: ["**/*.ts", "!coverage/**", "!utils/noop.ts", "!index.ts", "!app.ts", "!**/models/*.ts"],
coverageDirectory: "../coverage",
testEnvironment: "node",
roots: ["<rootDir>"],
modulePaths: [compilerOptions.baseUrl], // <-- This will be set to 'baseUrl' value
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, { prefix: "<rootDir>/../" }),
collectCoverage: false,
coverageThreshold: {
global: {
lines: 0,
branches: 0,
functions: 0,
statements: 0,
},
},
};
export = jestConfig;