-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
27 lines (27 loc) · 1.36 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
module.exports = {
testEnvironment: 'jest-environment-jsdom',
setupFilesAfterEnv: ['<rootDir>/.jest/setup-tests.js', '<rootDir>/jest.setup.js'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coveragePathIgnorePatterns: [
'/dist/',
'/node_modules/',
'.*\\.d\\.ts',
],
collectCoverage: true,
coverageReporters: ['lcov'],
collectCoverageFrom: ['<rootDir>/src/**/**/*.{tsx,ts}', '!<rootDir>/src/**/style.ts', '!<rootDir>/src/*.{tsx,ts}', '!<rootDir>/src/mocks/*.{tsx,ts}', '!<rootDir>/src/styles/*.{tsx,ts}', '!<rootDir>/src/pages/**/*.{tsx,ts}', '!<rootDir>/src/utils/routes.ts', '!<rootDir>/src/utils/AnimationRoutes.tsx'],
moduleNameMapper: {
'\\.(gif|ttf|eot|svg|png)$': '<rootDir>/.jest/__mocks__/fileMock.js',
"&components/(.*)": ["<rootDir>/src/components/$1"],
"&utils/(.*)": ["<rootDir>/src/utils/$1"],
"&hooks/(.*)": ["<rootDir>/src/hooks/$1"],
"&services/(.*)": ["<rootDir>/src/services/$1"],
"&contexts/(.*)": ["<rootDir>/src/contexts/$1"],
"&domains/(.*)": ["<rootDir>/src/domains/$1"],
"&schemas/(.*)": ["<rootDir>/src/schemas/$1"],
"&types/(.*)": ["<rootDir>/src/types/$1"],
"&styles/(.*)": ["<rootDir>/src/styles/$1"],
"\\.(css|less|scss|sass)$": "identity-obj-proxy"
},
setupFiles: ["<rootDir>/.jest/globalSetup.ts"]
}