-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.cjs
33 lines (33 loc) · 1.08 KB
/
jest.config.cjs
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 = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
moduleNameMapper: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/tests/mock/fileMock.js',
'\\.(css|less|scss)$': '<rootDir>/tests/mock/styleMock.js',
'^components/(.*)$': '<rootDir>/src/components/$1',
'^layouts/(.*)$': '<rootDir>/src/layouts/$1',
'^ui/(.*)$': '<rootDir>/src/components/ui/$1',
'^pages/(.*)$': '<rootDir>/src/pages/$1',
'^api/(.*)$': '<rootDir>/src/api/$1',
'^assets/(.*)$': '<rootDir>/src/assets/$1',
'^models/(.*)$': '<rootDir>/src/models/$1',
'^shared/(.*)$': '<rootDir>/src/shared/$1',
'^store/(.*)$': '<rootDir>/src/shared/store/$1',
'^hooks/(.*)$': '<rootDir>/src/hooks/$1',
'^utils/(.*)$': '<rootDir>/src/utils/$1',
},
setupFilesAfterEnv: ['<rootDir>/tests/setupTests.ts'],
coverageThreshold: {
global: {
statements: 80,
},
},
collectCoverageFrom: [
'src/**/*.ts',
'src/**/*.tsx',
'!src/main.tsx',
'!tests/mock/*.ts',
],
coverageReporters: ['text'],
};