-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjest.config.js
47 lines (47 loc) · 1.38 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
module.exports = {
preset: 'react-native',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
moduleNameMapper: {
'^.+\\.svg$': '<rootDir>/src/tests/mocks/svgMock.ts',
},
transformIgnorePatterns: [
'node_modules/(?!(jest-)?@?react-native|scheduler|react-native-vector-icons|@react-native-community|@react-navigation)',
],
setupFilesAfterEnv: [
'@testing-library/jest-native/extend-expect',
'jest-styled-components',
],
setupFiles: [
'./node_modules/react-native-gesture-handler/jestSetup.js',
'./jestSetupFile.js',
],
collectCoverage: false,
collectCoverageFrom: [
'<rootDir>/src/components/**/*.{js,jsx,ts,tsx}',
'<rootDir>/src/contexts/**/*.{js,jsx,ts,tsx}',
'<rootDir>/src/screens/**/*.{js,jsx,ts,tsx}',
'<rootDir>/src/services/**/*.{js,jsx,ts,tsx}',
'<rootDir>/src/utils/**/*.{js,jsx,ts,tsx}',
'!**/*spec.tsx',
'!**/useValidationSchema.ts',
'!**/*styles.ts',
'!<rootDir>/src/contexts/AllProviders.tsx',
'!<rootDir>/node_modules/',
'!<rootDir>/src/utils/lists.ts',
'!<rootDir>/src/configs/featuresFlag.ts',
],
coverageThreshold: {
global: {
branches: 50,
functions: 80,
lines: 80,
statements: 80,
},
},
globals: {
RN_BASE_URL: 'https://example.com',
RN_BASE_URL_API: 'https://example.com/api',
RN_ENV: 'test',
RN_FEATURES_OFF: '',
},
};