forked from epam/UUI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
65 lines (65 loc) · 1.86 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
module.exports = {
"collectCoverageFrom": [
"**/*.{ts,tsx}",
"!src/**/*.d.ts",
"!**/*.doc*",
"!./app/**/*",
"!./infrastructure/**/*"
],
coverageReporters: ["html"],
"resolver": "jest-pnp-resolver",
"setupFiles": [
"react-app-polyfill/jsdom",
// "<rootDir>/test-utils/helpers.tsx"
],
"setupFilesAfterEnv": ["./setupTests.js"],
"testMatch": [
'<rootDir>/**/*.{spec,test}.{js,jsx,ts,tsx}',
],
"testEnvironment": "jsdom",
"testURL": "http://localhost",
// "preset": "ts-jest",
"transform": {
// ...tsjPreset.transform,
"^.+\\.(js|jsx|ts|tsx)$": "<rootDir>/node_modules/babel-jest",
// "^.+\\.(js|jsx|ts|tsx)$": "<rootDir>/node_modules/ts-jest",
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/uui-build/config/jest/fileTransform.js",
"^.+\\.css$": "<rootDir>/uui-build/config/jest/cssTransform.js",
},
"transformIgnorePatterns": [
"[/\\\\]node_modules[/\\\\].+\\.(js|jsx|ts|tsx)$",
"^.+\\.(sass|scss|less)$"
],
"testPathIgnorePatterns": [
"node_modules",
"templates",
"./next-app"
],
"modulePathIgnorePatterns": [
"/build/",
"./next-app"
],
"moduleNameMapper": {
"^react-native$": "react-native-web",
"^.+\\.(sass|scss|less)$": "<rootDir>/uui-build/config/jest/cssModuleTransform.js",
"@epam/test-utils": "<rootDir>/test-utils",
"\\.svg": "<rootDir>/test-utils/mocks/svgrMock.js"
},
"moduleFileExtensions": [
"web.js",
"js",
"web.ts",
"ts",
"web.tsx",
"tsx",
"json",
"web.jsx",
"jsx",
"node"
],
"globals": {
"ts-jest": {
"tsconfig": "tsconfig.test.json"
}
}
}