forked from ixartz/React-Native-Boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
31 lines (30 loc) · 974 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
31
module.exports = {
preset: '@testing-library/react-native',
moduleNameMapper: {
// Handle module aliases (this will be automatically configured for you soon)
'^@/(.*)$': '<rootDir>/src/$1',
'^__mocks__/(.*)$': '<rootDir>/__mocks__/$1',
},
setupFilesAfterEnv: ['./jest.setup.ts'],
transformIgnorePatterns: [
'node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg)',
],
clearMocks: true,
collectCoverage: true,
collectCoverageFrom: [
'./src/**/*.{js,ts}',
'!**/coverage/**',
'!**/node_modules/**',
'!**/babel.config.js',
'!**/jest.setup.js',
],
coverageThreshold: {
global: {
branches: 30,
functions: 30,
lines: 30,
statements: 30,
},
},
testPathIgnorePatterns: ['<rootDir>/node_modules/', '<rootDir>/.expo/'],
};