-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathjest.config.js
More file actions
29 lines (29 loc) · 922 Bytes
/
jest.config.js
File metadata and controls
29 lines (29 loc) · 922 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
27
28
29
module.exports = {
preset: 'react-native',
setupFiles: ['<rootDir>/src/__mocks__/jest.setup.ts'],
setupFilesAfterEnv: [
'<rootDir>/node_modules/@testing-library/jest-native/extend-expect',
],
testMatch: ['<rootDir>/src/**/*.(test|spec).[jt]s?(x)'],
transformIgnorePatterns: [
'node_modules/(?!(react-native|@react-native|@react-navigation|react-native-screens|react-native-safe-area-context|react-native-gesture-handler|react-native-webview)/)',
],
collectCoverageFrom: [
'src/**/*.{cjs,js,jsx,mjs,ts,tsx}',
'!src/**/*.test.{cjs,js,jsx,mjs,mdx,ts,tsx}',
'!src/(__tests__|__mocks__)/*',
],
modulePathIgnorePatterns: [
'<rootDir>/example/node_modules',
'<rootDir>/lib/',
],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
coverageThreshold: {
global: {
branches: 10,
functions: 30,
lines: 30,
statements: 30,
},
},
};