-
Notifications
You must be signed in to change notification settings - Fork 2
/
jest.config.js
45 lines (45 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
const commonConfig = {
"globals": {
"MODE": "DEV",
ENDPOINT_URL: "/api"
},
"transform": {
"^.+\\.tsx?$": "ts-jest",
"^.+\\.js$": "babel-jest",
"^.+\\.svg$": "jest-svg-transformer"
},
"moduleNameMapper": {
"^.+\\.(css|scss|png|ico)$": "identity-obj-proxy",
},
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
]
};
module.exports = {
"projects": [
{
...commonConfig,
"name": "frontend",
"testMatch": [
"<rootDir>/src/**/__tests__/**/*.[jt]s?(x)"
],
"setupFilesAfterEnv": ["./src/setupTests.ts"],
"snapshotSerializers": [
"enzyme-to-json/serializer"
]
},
{
...commonConfig,
"name": "backend",
"testEnvironment": "node",
"testMatch": [
"<rootDir>/backend/**/__tests__/**/*.[jt]s?(x)"
]
},
]
};