-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
58 lines (58 loc) 路 1.6 KB
/
Copy pathjest.config.js
File metadata and controls
58 lines (58 loc) 路 1.6 KB
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
module.exports = {
verbose: true,
globals: {
'ts-jest': {
isolatedModules: true,
},
},
setupFilesAfterEnv: ['<rootDir>/jest.js'],
roots: ['./'],
testEnvironment: 'jsdom',
coverageReporters: ['lcov'],
coverageDirectory: './coverage',
collectCoverageFrom: [
'src/**/*.ts',
'src/**/*.tsx',
// exclude files from coverage
'!src/**/index.ts',
'!src/**/index.tsx',
'!src/**/App.tsx',
'!src/**/react-app-env.d.ts',
'!src/**/reportWebVitals.ts',
'!src/**/setupTests.ts',
],
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx'],
moduleDirectories: ['node_modules'],
moduleNameMapper: {
'^@assets$': '<rootDir>/src/assets',
'^@assets/(.*)$': '<rootDir>/src/assets/$1',
'@router': '<rootDir>/src/router',
'@screens': '<rootDir>/src/screens',
'@hooks': '<rootDir>/src/hooks',
'@components': '<rootDir>/src/components',
'@localization': '<rootDir>/src/localization',
'@providers': '<rootDir>/src/providers',
// UI store
'@uiStore': '<rootDir>/src/store/uiStore',
// Process store
'@processStore': '<rootDir>/src/store/processStore',
// Settings store
'@settingsStore': '<rootDir>/src/store/settingsStore',
// App store
'@appStore': '<rootDir>/src/store/appStore',
'^.+.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$':
'jest-transform-stub',
},
transform: {
'.+\\.(css|scss|png|jpg|jpeg|svg)$': 'jest-transform-stub',
'^.+\\.(js|jsx|ts|tsx)$': 'ts-jest',
},
coverageThreshold: {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: -50,
},
},
};