-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.js
46 lines (46 loc) · 1.48 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
module.exports = {
transform: {
'^.+\\.tsx?$': ['ts-jest', { diagnostics: false }],
},
testMatch: [
'<rootDir>/src/**/*.test.{js,jsx,ts,tsx}',
],
moduleNameMapper: {
'\\.(svg|png)': '<rootDir>/__mocks__/ImageMock.tsx',
},
moduleFileExtensions: ['js', 'json', 'ts', 'tsx', 'jsx', 'node', 'mjs'],
modulePathIgnorePatterns: [
'<rootDir>[/\\\\](|coverage|node_modules)[/\\\\]',
'src/components/TrackTile/TrackerDetails/AdvancedTrackerEditor/AdvancedTrackerEditor.test.tsx',
],
preset: 'react-native',
setupFilesAfterEnv: [
'@testing-library/jest-native/extend-expect',
'<rootDir>/jest.setup.ts',
'./node_modules/react-native-gesture-handler/jestSetup.js'
],
clearMocks: true,
collectCoverage: true,
collectCoverageFrom: ['<rootDir>/src/**/*.{ts,tsx,js,jsx}', '!src/**/**/index.ts'],
coveragePathIgnorePatterns: [
'src/common/testID',
'src/common/init',
'src/common/RootProviders',
'src/common/LoggedInProviders',
'src/common/ThemedNavigationContainer',
'src/navigators', 'src/components/TrackTile',
'components/BrandConfigProvider/theme/generateColors.ts',
],
coverageThreshold: {
global: {
branches: 75,
statements: 75,
functions: 75,
lines: 75,
},
},
transformIgnorePatterns: [
'node_modules/(?!(jest-)?@?react-native|query-string|decode-uri-component|split-on-first|filter-obj|victory|@lifeomic/one-query|react-navigation-header-buttons)',
],
workerIdleMemoryLimit: '900MB',
};