-
Notifications
You must be signed in to change notification settings - Fork 2
/
jest.config.ts
53 lines (42 loc) · 1.23 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import type { Config } from "jest";
const config: Config = {
collectCoverage: true,
collectCoverageFrom: [
"server/src/**/*.ts",
"!server/src/tests/**",
"!**/node_modules/**",
],
coverageDirectory: "coverage",
coverageProvider: "v8",
coverageReporters: ["json", "text", "html"],
coverageThreshold: {
global: {
statements: 54,
branches: 49,
functions: 43,
lines: 54,
},
},
moduleDirectories: ["node_modules"],
workerIdleMemoryLimit: "500MB",
moduleFileExtensions: ["ts", "js", "mjs", "cjs", "json"],
extensionsToTreatAsEsm: [".ts"],
moduleNameMapper: {
"(.+)\\.js": "$1",
},
preset: "ts-jest/presets/js-with-ts-esm",
resetMocks: false,
// A list of paths to directories that Jest should use to search for files in
roots: ["server/src/tests"],
setupFilesAfterEnv: [],
testEnvironment: "node",
testEnvironmentOptions: {},
testMatch: ["**/tests/**/*.spec.ts"],
testPathIgnorePatterns: [],
testTimeout: 30000,
transform: {
"\\.ts?$": ["ts-jest", { useESM: true }],
},
transformIgnorePatterns: ["node_modules/"],
};
export default config;