generated from johnyherangi/node-cli-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjest.config.ts
29 lines (27 loc) · 851 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 { pathsToModuleNameMapper } from "ts-jest"
import { compilerOptions } from "./tsconfig.paths.json"
/*
* For a detailed explanation regarding each configuration property and type check, visit:
* https://jestjs.io/docs/en/configuration.html
*/
export default {
automock: false,
clearMocks: true,
restoreMocks: true,
coverageDirectory: "coverage",
coverageProvider: "v8",
coverageReporters: ["text", "lcov"],
collectCoverageFrom: [
"**/src/**/*.{js,ts}",
"!**/__tests__/**",
"!**/src/index.ts",
"!**/src/types.ts",
],
maxWorkers: 10,
preset: "ts-jest",
testEnvironment: "node",
testMatch: ["**/__tests__/**/*.test.ts"],
roots: ["<rootDir>"],
modulePaths: [compilerOptions.baseUrl],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths),
}