-
Notifications
You must be signed in to change notification settings - Fork 38
/
jest.config.ts
36 lines (35 loc) · 1004 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
36
import type { Config } from "jest";
export default {
coverageProvider: "v8",
verbose: true,
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node", "html"],
testMatch: ["<rootDir>/src/**/*.test.ts", "<rootDir>/src/**/*.test.tsx"],
maxWorkers: "50%",
setupFilesAfterEnv: ["<rootDir>/jest.setup.tsx"],
testEnvironment: "jsdom",
transform: {
"^.+\\.(t|j)sx?$": "@swc/jest",
},
moduleNameMapper: {
"@env": "<rootDir>/src/env/index.ts",
uuid: require.resolve("uuid"),
},
collectCoverageFrom: [
"<rootDir>/src/**/*.{ts,tsx,js,jsx}",
"!<rootDir>/src/**/*.d.ts",
"!<rootDir>/src/main.tsx",
"!<rootDir>/src/utils/constants.ts",
"!<rootDir>/src/utils/styles.ts",
"!<rootDir>/src/env/**/*.*",
"!<rootDir>/src/theme/**/*.*",
],
coverageThreshold: {
global: {
// statements: 100,
// branches: 100,
// functions: 100,
// lines: 100
},
},
coverageReporters: ["lcov", "text", "text-summary"],
} as Config;