forked from mossland/mossverse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.ts
35 lines (35 loc) · 843 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
30
31
32
33
34
35
import { getJestProjects } from "@nrwl/jest";
import type { Config } from "@jest/types";
import * as fs from "fs";
const swcrc = JSON.parse(fs.readFileSync("./.swcrc", "utf-8").toString());
const config: Config.InitialOptions = {
projects: getJestProjects() as string[],
collectCoverageFrom: [
"apps/**/*.ts",
"libs/**/*.ts",
"!main.ts",
"!**/*.module.ts",
"!**/*.input.ts",
"!**/*.entity.ts",
"!**/*.args.ts",
"!**/*.helper.ts",
"!**/*.types.ts",
"!**/*.entities.ts",
"!**/*.helpers.ts",
"!**/node_modules/**",
],
transform: {
"^.+\\.(t|j)sx?$": ["@swc/jest", swcrc],
},
coverageThreshold: {
global: {
branches: 80,
functions: 50,
lines: 80,
statements: 80,
},
},
testEnvironment: "node",
detectOpenHandles: true,
};
export default config;