-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
33 lines (33 loc) · 870 Bytes
/
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
module.exports = {
projects: [
{
displayName: 'client',
testEnvironment: 'jest-environment-jsdom',
setupFilesAfterEnv: ['<rootDir>/src/setupTests.js'],
testMatch: ['**/__tests__/(components|pages)/**/*.[jt]s?(x)'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
},
transform: {
'^.+\\.(js|jsx)$': [
'babel-jest',
{ presets: ['@babel/preset-react', '@babel/preset-env'] },
],
},
},
{
displayName: 'server',
testEnvironment: 'node',
testMatch: ['**/__tests__/(api|services)/**/*.[jt]s?(x)'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
},
transform: {
'^.+\\.(js|jsx)$': [
'babel-jest',
{ presets: ['@babel/preset-react', '@babel/preset-env'] },
],
},
},
],
};