-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathjest.config.ts
47 lines (34 loc) · 1.33 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import type { Config } from '@jest/types'
const config: Config.InitialOptions = {
clearMocks: true,
collectCoverage: false,
coverageDirectory: 'coverage',
coverageProvider: 'v8',
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
'^@apis(.*)$': '<rootDir>/src/apis/$1',
'^@mocks(.*)$': '<rootDir>/src/mocks/$1',
'^@assets(.*)$': '<rootDir>/src/assets/$1',
'^@components(.*)$': '<rootDir>/src/components/$1',
'^@configs(.*)$': '<rootDir>/src/configs/$1',
'^@constants(.*)$': '<rootDir>/src/constants/$1',
'^@containers(.*)$': '<rootDir>/src/containers/$1',
'^@hooks(.*)$': '<rootDir>/src/hooks/$1',
'^@pages(.*)$': '<rootDir>/src/pages/$1',
'^@styles(.*)$': '<rootDir>/src/styles/$1',
'^@themes(.*)$': '<rootDir>/src/styles/themes/$1',
'^@types(.*)$': '<rootDir>/src/types/$1',
'^@utils(.*)$': '<rootDir>/src/utils/$1'
},
transform: {
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest',
'^.+\\.svg$': 'jest-transformer-svg'
},
testEnvironment: 'jest-environment-node',
testMatch: ['<rootDir>/**/*.test.(js|jsx|ts|tsx)'],
transformIgnorePatterns: ['<rootDir>/node_modules/'],
setupFilesAfterEnv: ['@testing-library/jest-dom/extend-expect'],
testPathIgnorePatterns: ['<rootDir>/src/tests/e2e']
}
export default config