-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathjest.config.ts
49 lines (45 loc) · 1.22 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
import type { Config } from "jest"
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { compilerOptions } = require("./tsconfig")
// For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html
const config: Config = {
verbose: true,
collectCoverage: true,
collectCoverageFrom: [
"**/*.{js,jsx,ts,tsx}",
"!**/docs/**",
"!**/node_modules/**",
"!**/coverage/**",
"!**/dist/**",
"!**/nibiru/**",
"!**/index.*.ts",
"!**/index.ts",
"!**/src/protojs/**",
"!jest.config.ts",
],
testPathIgnorePatterns: ["/node_modules/", "/dist/"],
coverageReporters: ["json-summary", "text", "html", "lcov"],
coverageThreshold: {
global: {
branches: 75,
functions: 75,
lines: 75,
statements: 75,
},
},
globals: {
window: {
location: {},
},
},
moduleDirectories: ["<rootDir>", "node_modules", "src"],
moduleFileExtensions: ["js", "jsx", "ts", "tsx"],
modulePaths: [compilerOptions.baseUrl], // <-- This will be set to 'baseUrl' value
roots: ["<rootDir>"],
preset: "ts-jest",
testEnvironment: "node",
reporters: ["default"],
testTimeout: 120000,
}
export default config