-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathjest.config.js
More file actions
26 lines (26 loc) · 915 Bytes
/
jest.config.js
File metadata and controls
26 lines (26 loc) · 915 Bytes
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
module.exports = {
testEnvironment: 'node',
roots: ['<rootDir>/src'],
transform: {
'^.+\\.(ts|tsx)$': ['ts-jest', { tsconfig: 'tsconfig.json' }],
},
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(ts|tsx)$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
'^@components/(.*)$': '<rootDir>/src/components/$1',
'^@hooks/(.*)$': '<rootDir>/src/hooks/$1',
'^@services/(.*)$': '<rootDir>/src/services/$1',
'^@store/(.*)$': '<rootDir>/src/store/$1',
'^@types/(.*)$': '<rootDir>/src/types/$1',
'^@utils/(.*)$': '<rootDir>/src/utils/$1',
'^react-native$': '<rootDir>/node_modules/react-native',
},
collectCoverageFrom: [
'src/**/*.{ts,tsx}',
'!src/**/*.d.ts',
'!src/**/index.ts',
],
testPathIgnorePatterns: ['/node_modules/'],
};