-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.json
76 lines (76 loc) · 2.41 KB
/
jest.config.json
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
66
67
68
69
70
71
72
73
74
75
76
{
"roots": [
"<rootDir>"
],
"setupFiles": [
"react-app-polyfill/jsdom"
],
"setupFilesAfterEnv": [
"<rootDir>/.jest/setupEnzyme.js",
"<rootDir>/.jest/setupJest.js",
"<rootDir>/.jest/before.js"
],
"testMatch": [
"<rootDir>/src/**/__tests__/**/*.{js,jsx,ts,tsx}",
"<rootDir>/src/**/*.{spec,test}.{js,jsx,ts,tsx}"
],
"testRunner": "<rootDir>/node_modules/jest-circus/runner.js",
"modulePaths": [
"<rootDir>"
],
"watchPlugins": [
"jest-watch-typeahead/filename",
"jest-watch-typeahead/testname"
],
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
],
"moduleNameMapper": {
"^@src(.*)$": "<rootDir>/src$1",
"^@hoc(.*)$": "<rootDir>/src/hoc$1",
"^@hooks(.*)$": "<rootDir>/src/hooks$1",
"^@config(.*)$": "<rootDir>/src/config$1",
"^@assets(.*)$": "<rootDir>/src/assets$1",
"^@styles(.*)$": "<rootDir>/src/styles$1",
"^@services(.*)$": "<rootDir>/src/services$1",
"^@navigation(.*)$": "<rootDir>/src/navigation$1",
"^@layouts(.*)$": "<rootDir>/src/pages/__layouts__$1",
"^@components(.*)$": "<rootDir>/src/components$1",
"^@atoms(.*)$": "<rootDir>/src/components/atoms$1",
"^@molecules(.*)$": "<rootDir>/src/components/molecules$1",
"^@public(.*)$": "<rootDir>/public/$1",
"^@helpers(.*)$": "<rootDir>/src/helpers$1",
"^@util(.*)$": "<rootDir>/src/util$1",
"^@pages(.*)$": "<rootDir>/src/pages$1",
"^@state(.*)$": "<rootDir>/src/redux$1",
"^@i18n(.*)$": "<rootDir>/src/i18n$1",
"^@gql(.*)$": "<rootDir>/src/graphql$1",
"\\.(scss|css|less)$": "<rootDir>/.jest/__mocks__/styleMock.js"
},
"verbose": true,
"resetMocks": true,
"preset": "ts-jest",
"testEnvironment": "jsdom",
"transform": {
"^.+\\.jsx?$": "babel-jest",
"\\.(svg|jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/.jest/fileTransformer.js"
},
"transformIgnorePatterns": [
"node_modules/(?!variables/.*)"
],
"collectCoverage": true,
"coverageReporters": ["json", "html"],
"collectCoverageFrom": [
"**/*.{ts,tsx}",
"!**/node_modules/**"
],
"moduleDirectories": [
"node_modules",
"src"
]
}