-
-
Notifications
You must be signed in to change notification settings - Fork 673
Expand file tree
/
Copy pathjest.config.cts
More file actions
25 lines (24 loc) · 793 Bytes
/
jest.config.cts
File metadata and controls
25 lines (24 loc) · 793 Bytes
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
import { pathsToModuleNameMapper, JestConfigWithTsJest } from "ts-jest";
import tsconfig from "./tsconfig.json";
export default {
preset: "ts-jest",
verbose: false,
rootDir: "./",
roots: ["<rootDir>/src", "<rootDir>/tests"],
testEnvironment: "node",
collectCoverage: false,
collectCoverageFrom: [
"<rootDir>/src/**/*.ts",
"!<rootDir>/src/**/*.d.ts",
"!<rootDir>/src/shim.ts",
],
moduleNameMapper: pathsToModuleNameMapper(tsconfig.compilerOptions.paths, {
prefix: "<rootDir>",
}),
transform: {
"^.+\\.tsx?$": ["ts-jest", { tsconfig: "./tests/tsconfig.json" }],
},
testMatch: ["**/functional/**/*.ts"],
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
coverageDirectory: "<rootDir>/coverage",
} satisfies JestConfigWithTsJest;