-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjest.config.js
34 lines (32 loc) · 1.05 KB
/
jest.config.js
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
const path = require("path");
module.exports = {
clearMocks: true,
collectCoverage: true,
collectCoverageFrom: ["**/*.{ts,tsx}", "!**/*.d.ts", "!**/node_modules/**"],
coverageDirectory: "coverage",
coverageReporters: ["text-summary", "lcov"],
testMatch: ["<rootDir>/src/**/?(*.)+(spec|test).[jt]s?(x)"],
coverageThreshold: {
global: {
branches: 60,
functions: 50,
lines: 50,
statements: 60,
},
},
errorOnDeprecated: false,
moduleNameMapper: {
"\\.(jpg|jpeg|png|gif|webp|svg|bmp|woff|woff2|ttf)$": "<rootDir>/test/mocks/fileMock.js",
"\\.(css|less|scss|sass)$": "identity-obj-proxy",
"test/(.*)$": "<rootDir>/test/$1",
"~/(.*)$": "<rootDir>/src/$1",
"@helpers/(.*)$": "<rootDir>/src/helpers/$1",
"~hooks/(.*)$": "<rootDir>/src/hooks/$1",
"@components/(.*)$": "<rootDir>/src/components/$1",
"@modules/(.*)$": "<rootDir>/src/modules/$1",
},
setupFilesAfterEnv: ["<rootDir>/test/setup.ts"],
globalTeardown: "<rootDir>/test/teardown.ts",
verbose: true,
testEnvironment: "jsdom",
};