Refactor mobile to fix dependency resolution and add polyfills
Update Expo and React dependencies to compatible versions. Create a custom Metro config to resolve module conflicts in the workspace and map Jest modules to local node_modules. Add a SharedArrayBuffer polyfill for older runtimes and introduce an adapter for expo-notifications to abstract direct imports.
This commit is contained in:
@@ -1,4 +1,12 @@
|
||||
module.exports = {
|
||||
preset: 'jest-expo',
|
||||
testMatch: ['**/__tests__/**/*.test.[jt]s?(x)'],
|
||||
moduleNameMapper: {
|
||||
'^react$': '<rootDir>/node_modules/react',
|
||||
'^react-test-renderer$': '<rootDir>/node_modules/react-test-renderer',
|
||||
'^react-native-safe-area-context$': '<rootDir>/node_modules/react-native-safe-area-context',
|
||||
'^react-native-screens$': '<rootDir>/node_modules/react-native-screens',
|
||||
'^@react-native-async-storage/async-storage$':
|
||||
'<rootDir>/node_modules/@react-native-async-storage/async-storage',
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user