-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
47 lines (45 loc) · 1.14 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
import type {Config} from "@jest/types";
const config: Config.InitialOptions = {
// eslint-disable-next-line unicorn/prefer-module
cacheDirectory: `${__dirname}/.jest_cache`,
roots: ["<rootDir>/src"],
preset: "ts-jest",
testRegex: "(.*.(test|spec)).(jsx?|tsx?|ts?)$",
moduleFileExtensions: ["ts", "js", "json"],
setupFiles: ["./src/testing/preRun.ts"],
collectCoverage: true,
transform: {
"^.+\\.(tsx?|ts?)$": ["ts-jest", {tsconfig: `tsconfig.test.json`}],
},
silent: false,
verbose: true,
collectCoverageFrom: [
"**/src/**/*.ts",
"!**/node_modules/**",
"!**/*.test.data.ts",
"!src/fixtures/**",
"!**/index.ts"
],
coverageThreshold: {
global: {
statements: 89.34,
branches: 81.17,
functions: 95.83,
lines: 89.34,
},
},
reporters: [
"default",
[
"jest-junit",
{
outputName: "junit-TEST.xml",
},
],
],
coveragePathIgnorePatterns: [
".*test\\.data\\.ts$,migrations.*.ts$,(.*.(test|spec)).(jsx?|tsx?)$,(tests/.*.mock).(jsx?|tsx?)$",
],
coverageReporters: ["json", "lcov", "text", "clover", "cobertura"],
};
export default config;