-
-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy pathjest.config.js
30 lines (28 loc) · 845 Bytes
/
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
// see https://jestjs.io/docs/configuration#transformignorepatterns-arraystring
// to transform mockSafeAreaContext
const packagesToTransformWithBabel = [
'@react-native',
'react-native',
'react-navigation',
];
const transformIgnorePatterns = [
`<rootDir>/node_modules/(?!(${packagesToTransformWithBabel.join('|')}))`,
];
module.exports = {
preset: 'react-native',
modulePathIgnorePatterns: [
'<rootDir>/example/node_modules',
'<rootDir>/lib/',
],
transformIgnorePatterns,
testPathIgnorePatterns: [
'<rootDir>/(?:.+?)/__tests__/_(?:.+?)', //ignore files prepended with underscore
],
maxWorkers: 2,
setupFiles: ['<rootDir>/jest.setup.js'],
coverageProvider: 'v8',
moduleNameMapper: {
'^[./a-zA-Z0-9$_-]+\\.png$':
'<rootDir>/node_modules/react-native/Libraries/Image/RelativeImageStub',
},
};