forked from nickovchinnikov/react-js-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
30 lines (29 loc) · 872 Bytes
/
jest.config.js
File metadata and controls
30 lines (29 loc) · 872 Bytes
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
// For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html
module.exports = {
clearMocks: true,
coverageDirectory: "coverage",
testEnvironment: "jsdom",
setupFilesAfterEnv: [
"<rootDir>/internals/jestSettings.js",
"<rootDir>/internals/jestSetup.ts",
],
transform: {
"^.+\\.(js|jsx|ts|tsx)$": "<rootDir>/node_modules/babel-jest",
"^.+\\.mdx$": "@storybook/addon-docs/jest-transform-mdx",
},
moduleNameMapper: {
// https://jestjs.io/docs/en/webpack#handling-static-assets
"\\.(css|less)$": "<rootDir>/internals/__mocks__/styleMock.js",
"^@/(.*)$": "<rootDir>/src/$1",
},
testPathIgnorePatterns: ["e2e"],
moduleDirectories: ["node_modules", "src"],
coverageThreshold: {
global: {
branches: 80,
functions: 70,
lines: 80,
},
},
};