generated from erunks/react-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.ts
32 lines (32 loc) · 800 Bytes
/
jest.config.ts
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
export default {
collectCoverage: true,
collectCoverageFrom: [
'src/components/**/*.{ts,tsx}',
'src/containers/**/*.{ts,tsx}',
'src/helpers/**/*.{ts,tsx}',
'src/hooks/**/*.{ts,tsx}',
'src/layouts/**/*.{ts,tsx}',
'src/routes/**/*.{ts,tsx}',
'!src/routes/index.{ts,tsx}',
],
coverageThreshold: {
global: {
branches: 70,
functions: 70,
lines: 70,
statements: 70,
},
},
moduleDirectories: ['node_modules', 'src'],
moduleFileExtensions: ['js', 'json', 'ts', 'tsx'],
moduleNameMapper: {
'^.+\\.(css|scss)$': 'identity-obj-proxy',
'^.+\\.svg$': 'jest-svg-transformer',
},
preset: 'ts-jest',
setupFilesAfterEnv: ['./jest.setup.ts'],
testEnvironment: 'jsdom',
transform: {
'^.+\\.{ts,tsx}$': 'ts-jest',
},
};