-
Notifications
You must be signed in to change notification settings - Fork 94
/
jest.config.js
60 lines (60 loc) · 1.52 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
module.exports = {
"testEnvironmentOptions": {
"enzymeAdapter": "react17",
},
"globals": {
"ts-jest": {
"babelConfig": false,
"isolatedModules": true,
},
},
"collectCoverage": false,
"modulePathIgnorePatterns": [
"<rootDir>/vendor", // don't go to the gems vendor folder. EVER.
"<rootDir>/tmp",
"<rootDir>/vendor",
"<rootDir>/storage",
"<rootDir>/log",
"<rootDir>/.vscode",
],
"moduleFileExtensions":["ts", "tsx", "js", "json", "jsx", "node"],
"moduleNameMapper": {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/app/javascript/__mocks__/fileMock.js",
"\\./regenerate.js": "<rootDir>/app/javascript/__mocks__/erbMock.js",
},
"setupFiles": [
"<rootDir>/setupTests.js",
],
"setupFilesAfterEnv": [
"<rootDir>/setupTestsAfterEnvLoaded.ts",
],
"snapshotSerializers": [
"enzyme-to-json/serializer",
],
"transform": {
"^.+\\.tsx?$": "babel-jest",
},
"transformIgnorePatterns": [
"<rootDir>/node_modules/(?!lodash-joins/)",
"<rootDir>/config/webpack/test.js",
"<rootDir>/vendor/",
"<rootDir>/tmp/",
"<rootDir>/public/",
"<rootDir>/storage/",
"<rootDir>/log/",
"<rootDir>/coverage/",
"<rootDir>/.vscode/",
],
"testPathIgnorePatterns": [
"<rootDir>/node_modules/",
"<rootDir>/config/webpack/test.js",
"<rootDir>/vendor/",
"<rootDir>/tmp/",
"<rootDir>/public/",
"<rootDir>/storage/",
"<rootDir>/log/",
"<rootDir>/coverage/",
"<rootDir>/.vscode/",
],
"testMatch":[ "<rootDir>/app/**/?(*.)+(spec|test).[jt]s?(x)" ],
};