/** * Jest setup for Gitea Native. * * Native modules that cannot run in the Jest (Node) environment are mocked here. * Test-specific mocks (e.g. expo-secure-store) live next to the tests that need them * unless they are required globally. */ // AsyncStorage: official in-memory mock provided by the package. jest.mock('@react-native-async-storage/async-storage', () => require('@react-native-async-storage/async-storage/jest/async-storage-mock'), ); // Reanimated: official mock (worklets are not available in Jest). jest.mock('react-native-reanimated', () => require('react-native-reanimated/mock')); // Safe area: official mock so SafeAreaView/useSafeAreaInsets work in tests. jest.mock('react-native-safe-area-context', () => require('react-native-safe-area-context/jest/mock')); // Haptics: no native module in Jest. jest.mock('expo-haptics', () => ({ selectionAsync: jest.fn(async () => undefined), impactAsync: jest.fn(async () => undefined), notificationAsync: jest.fn(async () => undefined), }));