-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathjest.config.ts
More file actions
20 lines (18 loc) · 804 Bytes
/
Copy pathjest.config.ts
File metadata and controls
20 lines (18 loc) · 804 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import type { Config } from "@jest/types";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import { compilerOptions } from "./tsconfig";
import { pathsToModuleNameMapper } from "ts-jest/utils";
const config: Config.InitialOptions = {
preset: "ts-jest",
roots: ["<rootDir>"],
transform: {
"^.+\\.tsx?$": "ts-jest"
},
setupFilesAfterEnv: ["<rootDir>/test/setup.ts"],
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths || {}, { prefix: "<rootDir>/" }),
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
testEnvironment: "jest-environment-jsdom-fifteen"
};
export default config;