generated from zourdyzou/react-typescript-croissant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
30 lines (28 loc) · 871 Bytes
/
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
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: 80,
functions: 50,
lines: 50,
statements: 80,
},
},
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",
},
setupFilesAfterEnv: ["<rootDir>/test/setup.ts"],
globalTeardown: "<rootDir>/test/teardown.ts",
verbose: true,
testEnvironment: "jsdom",
};