26 lines
1.3 KiB
JavaScript
26 lines
1.3 KiB
JavaScript
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$': '<rootDir>/node_modules/react',
|
|
'^react/jsx-runtime$': '<rootDir>/node_modules/react/jsx-runtime.js',
|
|
'^react/jsx-dev-runtime$': '<rootDir>/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$':
|
|
'<rootDir>/__mocks__/react-native-nitro-sound.js',
|
|
'^react-native-google-mobile-ads$':
|
|
'<rootDir>/__mocks__/react-native-google-mobile-ads.js',
|
|
'^react-native-iap$': '<rootDir>/__mocks__/react-native-iap.js',
|
|
'^react-native-keychain$': '<rootDir>/__mocks__/react-native-keychain.js',
|
|
'^@react-native-documents/picker$':
|
|
'<rootDir>/__mocks__/@react-native-documents-picker.js',
|
|
'^whisper\\.rn(?:/index)?$': '<rootDir>/__mocks__/whisper-rn.js',
|
|
},
|
|
};
|