-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathjest.config.cjs
More file actions
43 lines (42 loc) · 926 Bytes
/
jest.config.cjs
File metadata and controls
43 lines (42 loc) · 926 Bytes
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
module.exports = {
preset: 'ts-jest',
maxWorkers: 1,
projects: [
{
displayName: 'server',
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['<rootDir>/server/__tests__/**/*.test.ts'],
setupFiles: ['<rootDir>/jest.setup.js'],
setupFilesAfterEnv: ['<rootDir>/jest.afterEnv.js'],
moduleNameMapper: {
'^@shared/(.*)$': '<rootDir>/shared/$1'
},
transform: {
'^.+\\.ts$': ['ts-jest', {
tsconfig: 'tsconfig.json'
}]
}
}
],
collectCoverageFrom: [
'server/**/*.{ts,tsx}',
'shared/**/*.{ts,tsx}',
'!**/*.d.ts',
'!**/node_modules/**',
'!**/__tests__/**',
'!**/__mocks__/**',
'!**/coverage/**'
],
coverageThreshold: {
global: {
branches: 70,
functions: 75,
lines: 80,
statements: 80
}
},
testTimeout: 10000,
clearMocks: true,
restoreMocks: true
}