-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.js
29 lines (29 loc) · 1.08 KB
/
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
module.exports = {
testEnvironment: 'jsdom',
setupFilesAfterEnv: ['<rootDir>/tests/setup.ts'],
collectCoverageFrom: [
'src/**/*.{ts,tsx,js,jsx}',
'!**/mocks/**',
'!src/**/*.types.ts',
'!src/pages/_app.tsx',
'!src/pages/_document.tsx',
],
testPathIgnorePatterns: ['/node_modules/', '/mocks/.*'],
coverageReporters: ['lcov', 'text-summary'],
moduleNameMapper: {
'@root(.*)': '<rootDir>$1',
'@api/(.*)': '<rootDir>/src/api/$1',
'@contexts/(.*)': '<rootDir>/src/contexts/$1',
'@contextProviders/(.*)': '<rootDir>/src/contextProviders/$1',
'@reducers/(.*)': '<rootDir>/src/reducers/$1',
'@hooks/(.*)': '<rootDir>/src/hooks/$1',
'@layouts/(.*)': '<rootDir>/src/layouts/$1',
'@components/(.*)': '<rootDir>/src/components/$1',
'@consts/(.*)': '<rootDir>/src/consts/$1',
'@assets/(.*)': '<rootDir>/src/assets/$1',
'@styles/(.*)': '<rootDir>/src/styles/$1',
'@utils/(.*)': '<rootDir>/src/utils/$1',
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/tests/fileMock.ts',
},
};