-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.ts
37 lines (36 loc) · 1.03 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
const config = {
verbose: true,
clearMocks: true,
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
moduleNameMapper: {
'^@/assets/(.*)$': '<rootDir>/src/assets/$1',
'^@/components/(.*)$': '<rootDir>/src/components/$1',
'^@/constants/(.*)$': '<rootDir>/src/constants/$1',
'^@/enums/(.*)$': '<rootDir>/src/enums/$1',
'^@/hooks/(.*)$': '<rootDir>/src/hooks/$1',
'^@/libs/(.*)$': '<rootDir>/src/libs/$1',
'^@/types/(.*)$': '<rootDir>/src/types/$1',
'^@/utils/(.*)$': '<rootDir>/src/utils/$1',
'^@/stores/(.*)$': '<rootDir>/src/stores/$1',
'^@/styles/(.*)$': '<rootDir>/src/styles/$1',
'^@/pages/(.*)$': '<rootDir>/src/pages/$1',
},
testEnvironment: 'jsdom',
transform: {
'^.+\\.(t|j)s?$': ['@swc/jest'],
'^.+\\.(t|j)sx?$': [
'@swc/jest',
{
jsc: {
transform: {
react: {
runtime: 'automatic',
},
},
},
},
],
},
transformIgnorePatterns: ['<rootDir>/node_modules/'],
};
export default config;