-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathjest.config.js
30 lines (30 loc) · 1.04 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
module.exports = {
moduleNameMapper: {
"^@/(.*)$": "<rootDir>/src/$1",
},
testEnvironment: "jsdom",
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json"],
transform: {
"\\.[jt]sx?$": "babel-jest",
".+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$":
"jest-transform-stub"
},
collectCoverage: true,
collectCoverageFrom: [
"<rootDir>/src/**/*.{ts,tsx}",
"!<rootDir>/src/*",
"!<rootDir>/src/common/**",
"!<rootDir>/src/layouts/**",
"!<rootDir>/src/store/**",
"!<rootDir>/src/features/**/*.ts",// ignore rtk query files
"!<rootDir>/src/**/*.stories.{ts,tsx}", // ignore storybook files,
"!<rootDir>/src/**/*.stories.{ts,tsx}",
],
moduleDirectories: ["node_modules", __dirname],
modulePathIgnorePatterns: ["<rootDir>/lib/"],
transformIgnorePatterns: [
"node_modules/@mui/material/styles/useTheme/",
],
setupFilesAfterEnv: ["@testing-library/jest-dom", "<rootDir>/setupTests.ts"],
testTimeout: 10000
};