-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathjest.config.ts
25 lines (24 loc) · 954 Bytes
/
jest.config.ts
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
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.tsx'],
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/**/*.test.{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/'],
}