BlueWallet/__mocks__/react-native-image-picker.ts

14 lines
358 B
TypeScript
Raw Normal View History

2023-10-23 18:12:11 +02:00
import { NativeModules } from 'react-native';
2020-12-10 18:57:05 +01:00
// Mock the ImagePickerManager native module to allow us to unit test the JavaScript code
NativeModules.ImagePickerManager = {
showImagePicker: jest.fn(),
launchCamera: jest.fn(),
launchImageLibrary: jest.fn(),
};
// Reset the mocks before each test
global.beforeEach(() => {
jest.resetAllMocks();
});