-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathjest.config.ts
More file actions
27 lines (25 loc) · 916 Bytes
/
jest.config.ts
File metadata and controls
27 lines (25 loc) · 916 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
26
27
import presets from "jest-preset-angular/presets";
import { type JestConfigWithTsJest, pathsToModuleNameMapper } from "ts-jest";
import { compilerOptions } from "./tsconfig.json";
export default {
...presets.createCjsPreset(),
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
prefix: "<rootDir>",
}),
setupFilesAfterEnv: ["<rootDir>/setup-jest.ts"],
testPathIgnorePatterns: ["/node_modules/", "/dist/"],
moduleFileExtensions: ["ts", "html", "js", "json"],
resolver: "jest-preset-angular/build/resolvers/ng-jest-resolver.js",
testEnvironment: "<rootDir>/jest-jsdom-env.ts",
collectCoverage: true,
collectCoverageFrom: ["./tedi/components/**/*.{js,ts,tsx}"],
coveragePathIgnorePatterns: ["\\.stories\\.ts$"],
coverageThreshold: {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: 80,
},
},
} satisfies JestConfigWithTsJest;