-
Notifications
You must be signed in to change notification settings - Fork 3
/
jest.config.js
28 lines (27 loc) · 1.03 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
const TEST_REGEX = '(/__tests__/.*|(\\.|/)(test|spec))\\.(js?|jsx?|tsx?|ts?)$'
module.exports = {
testEnvironment: 'jsdom',
testRegex: TEST_REGEX,
transform: {
'^.+\\.tsx?$': 'babel-jest'
},
testPathIgnorePatterns: ['<rootDir>/.next/', '<rootDir>/node_modules/'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
collectCoverage: false,
moduleNameMapper: {
'@/components/(.*)': ['<rootDir>/components/$1'],
'@/types/(.*)': ['<rootDir>/$1'],
'@/shared/(.*)': ['<rootDir>/shared/$1'],
'@/styles/(.*)': ['<rootDir>/shared/styles/$1'],
'@/jsons/(.*)': ['<rootDir>/shared/jsons/$1'],
'@/intl/(.*)': ['<rootDir>/shared/jsons/intl/$1'],
'@/assets/(.*)': ['<rootDir>/public/assets/$1'],
'@/services/(.*)': ['<rootDir>/services/$1'],
'@/hooks/(.*)': ['<rootDir>/hooks/$1'],
'@/hooks': ['<rootDir>/hooks/index.ts'],
'@/intl': ['<rootDir>/shared/intl/index.ts'],
'@/utils/(.*)': ['<rootDir>/tils/$1'],
'@/renderer/(.*)': ['<rootDir>/utils/renderer/$1'],
'@/(.*)': ['<rootDir>/$1']
}
}