-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.ts
52 lines (48 loc) · 1.09 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
import type { Config } from "jest/build/index.js";
const config: Config = {
clearMocks: true,
collectCoverage: true,
coveragePathIgnorePatterns: ["/node_modules/"],
coverageReporters: ["cobertura", "lcov", "text"],
moduleDirectories: ["node_modules"],
moduleFileExtensions: [
"js",
"mjs",
"cjs",
"jsx",
"ts",
"tsx",
"json",
"node",
],
notify: false,
// The root directory that Jest should scan for tests and modules within
// rootDir: undefined,
// A list of paths to directories that Jest should use to search for files in
// roots: [
// "<rootDir>"
// ],
silent: true,
extensionsToTreatAsEsm: [".ts"],
transform: {
"^.+\\.ts?$": [
"ts-jest",
{
useESM: true,
},
],
},
moduleNameMapper: {
"^(\\.{1,2}/.*)\\.js$": "$1",
},
setupFiles: ["./setupJest.ts"],
testLocationInResults: false,
testMatch: [
"**/__tests__/**/*.[jt]s?(x)",
"**/?(*.)+(spec|test).[tj]s?(x)",
"**/?(*.)+(spec|test).(m)js",
],
testPathIgnorePatterns: ["/node_modules/"],
verbose: true,
};
export default config;