-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
32 lines (29 loc) · 1017 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
26
27
28
29
30
31
32
import {Config} from '@jest/types';
const untranspiledModulePatterns = [
'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)',
];
const config: Config.InitialOptions = {
preset: 'jest-expo',
setupFilesAfterEnv: ['@testing-library/jest-native/extend-expect'],
testEnvironment: 'jest-environment-jsdom',
globals: {
'ts-jest': {
tsconfig: {
jsx: 'react',
},
},
},
testMatch: ['**/?(*.)+(spec|test).ts?(x)'],
collectCoverageFrom: [
'**/*.{ts,tsx}',
'!**/coverage/**',
'!**/node_modules/**',
'!**/babel.config.js',
'!**/jest.setup.js',
],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
transformIgnorePatterns: untranspiledModulePatterns,
coverageReporters: ['json-summary', 'text', 'lcov'],
moduleDirectories: ['node_modules', '<rootDir>/src'],
};
export default config;