/ jest.setup.js
jest.setup.js
1 // Jest setup file for ACDC Wallet 2 // Runs before each test file 3 4 // Mock expo modules that require native bindings 5 jest.mock('expo-secure-store', () => ({ 6 getItemAsync: jest.fn(), 7 setItemAsync: jest.fn(), 8 deleteItemAsync: jest.fn(), 9 })); 10 11 jest.mock('expo-haptics', () => ({ 12 impactAsync: jest.fn(), 13 notificationAsync: jest.fn(), 14 selectionAsync: jest.fn(), 15 })); 16 17 jest.mock('expo-clipboard', () => ({ 18 setStringAsync: jest.fn(), 19 getStringAsync: jest.fn(), 20 })); 21 22 jest.mock('expo-local-authentication', () => ({ 23 authenticateAsync: jest.fn().mockResolvedValue({ success: true }), 24 hasHardwareAsync: jest.fn().mockResolvedValue(true), 25 isEnrolledAsync: jest.fn().mockResolvedValue(true), 26 })); 27 28 jest.mock('expo-camera', () => ({ 29 Camera: { 30 requestCameraPermissionsAsync: jest.fn().mockResolvedValue({ granted: true }), 31 }, 32 })); 33 34 // Suppress React Native warnings in test output 35 jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper');