-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
36 lines (36 loc) · 1.22 KB
/
jest.config.js
File metadata and controls
36 lines (36 loc) · 1.22 KB
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
33
34
35
36
module.exports = {
testEnvironment: 'node',
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
testMatch: ['**/__tests__/**/*.test.[jt]s?(x)'],
testPathIgnorePatterns: [
'/node_modules/',
'components/destination/__tests__/',
'app/destination/__tests__/',
'app/\\(tabs\\)/__tests__/',
],
transform: {
'^.+\\.(js|jsx|ts|tsx)$': ['babel-jest', { configFile: './babel.config.js' }],
},
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|i18next|react-i18next|@tanstack/.*)/)',
],
collectCoverageFrom: [
'i18n/**/*.{ts,tsx}',
'app/**/*.{ts,tsx}',
'hooks/**/*.{ts,tsx}',
'components/**/*.{ts,tsx}',
'contexts/**/*.{ts,tsx}',
'data/**/*.{ts,tsx}',
'!**/coverage/**',
'!**/node_modules/**',
'!**/__tests__/**',
'!**/babel.config.js',
'!**/jest.setup.js',
'!**/.expo/**',
],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/$1',
'\\.(jpg|jpeg|png|gif|svg)$': '<rootDir>/__mocks__/fileMock.js',
},
};