module.exports = { preset: '@react-native/jest-preset', transformIgnorePatterns: [ 'node_modules/(?!((jest-)?react-native(-.*)?|@react-native(-community)?|@react-native-documents|@react-navigation)/)', ], setupFilesAfterEnv: ['react-native-gesture-handler/jestSetup.js'], moduleNameMapper: { // Workspace packages are junctions outside this app directory. Keep hook // components on the same React instance as react-test-renderer. '^react$': '/node_modules/react', '^react/jsx-runtime$': '/node_modules/react/jsx-runtime.js', '^react/jsx-dev-runtime$': '/node_modules/react/jsx-dev-runtime.js', '^@react-native-async-storage/async-storage$': '@react-native-async-storage/async-storage/jest/async-storage-mock', '^react-native-file-access$': 'react-native-file-access/jest/mock', '^react-native-nitro-sound$': '/__mocks__/react-native-nitro-sound.js', '^react-native-google-mobile-ads$': '/__mocks__/react-native-google-mobile-ads.js', '^react-native-iap$': '/__mocks__/react-native-iap.js', '^react-native-keychain$': '/__mocks__/react-native-keychain.js', '^@react-native-documents/picker$': '/__mocks__/@react-native-documents-picker.js', '^whisper\\.rn(?:/index)?$': '/__mocks__/whisper-rn.js', }, };