-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
29 lines (29 loc) · 1.11 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
29
module.exports = {
preset: '@testing-library/react-native',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
setupFilesAfterEnv: ['./jest-setup.ts'],
transform: {
'^.+\\.(ts|tsx)$': 'babel-jest',
},
transformIgnorePatterns: [
'node_modules/(?!(react-native|react-native-swiper|react-redux|react-native-linear-gradient|@react-navigation|@react-native|@react-native/assets)/)',
],
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$',
testPathIgnorePatterns: ['/node_modules/', '/android/', '/ios/'],
collectCoverage: true,
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
'\\.(png|jpg|jpeg|gif|svg)$': '<rootDir>/__mocks__/fileMock.tsx',
'react-native-responsive-fontsize':
'<rootDir>/__mocks__/react-native-responsive-fontsize.tsx',
'react-native-size-matters':
'<rootDir>/__mocks__/react-native-size-matters.tsx',
},
coverageReporters: ['json', 'text', 'lcov', 'clover'],
collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}', '!src/**/*.d.ts' , '!src/navigation/*.{js,jsx,ts,tsx}'],
globals: {
'ts-jest': {
babelConfig: true,
},
},
};