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
28 lines (27 loc) · 847 Bytes
/
jest.config.js
File metadata and controls
28 lines (27 loc) · 847 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
// 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"],
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: 85,
functions: 74,
lines: 85,
statements: -100,
},
},
};