-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
41 lines (41 loc) · 1.18 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
35
36
37
38
39
40
41
module.exports = {
testEnvironment: "jsdom",
moduleFileExtensions: ["js", "jsx", "scss"],
testMatch: ["<rootDir>/**/*.(spec|test).(js|jsx)"],
transform: {
"^.+\\.(js|jsx)$": [
"babel-jest",
{
presets: [
"@babel/preset-env",
["@babel/preset-react", { runtime: "automatic" }],
],
},
],
"^.+\\.(scss|svg)$": "jest-transform-stub",
},
moduleNameMapper: {
axios: "axios/dist/node/axios.cjs",
"^@assets/(.*)$": "<rootDir>/src/Assets/$1",
"^@components/(.*)$": "<rootDir>/src/Components/$1",
"^@containers/(.*)$": "<rootDir>/src/Containers/$1",
"^@contexts/(.*)$": "<rootDir>/src/Contexts/$1",
"^@core/(.*)$": "<rootDir>/src/Core/$1",
"^@pages/(.*)$": "<rootDir>/src/Pages/$1",
"^@routes/(.*)$": "<rootDir>/src/Routes/$1",
"^@styles/(.*)$": "<rootDir>/src/Styles/$1",
"^@utils/(.*)$": "<rootDir>/src/Utils/$1",
},
modulePathIgnorePatterns: ["<rootDir>/build/"],
setupFilesAfterEnv: ["@testing-library/jest-dom/extend-expect"],
reporters: [
"default",
[
"jest-junit",
{
outputDirectory: "test-results",
outputName: "junit.xml",
},
],
],
};