Brandon Presley
cc97c760bb
Running tests gives the following error: TypeError: _reactNative.BackHandler.addEventListener is not a function
22 lines
824 B
TypeScript
22 lines
824 B
TypeScript
import {NativeModules as RNNativeModules} from 'react-native';
|
|
|
|
RNNativeModules.UIManager = RNNativeModules.UIManager || {};
|
|
RNNativeModules.UIManager.RCTView = RNNativeModules.UIManager.RCTView || {};
|
|
RNNativeModules.RNGestureHandlerModule =
|
|
RNNativeModules.RNGestureHandlerModule || {
|
|
State: {BEGAN: 'BEGAN', FAILED: 'FAILED', ACTIVE: 'ACTIVE', END: 'END'},
|
|
attachGestureHandler: jest.fn(),
|
|
createGestureHandler: jest.fn(),
|
|
dropGestureHandler: jest.fn(),
|
|
updateGestureHandler: jest.fn(),
|
|
};
|
|
RNNativeModules.PlatformConstants = RNNativeModules.PlatformConstants || {
|
|
forceTouchAvailable: false,
|
|
};
|
|
RNNativeModules.RNViewShot = RNNativeModules.RNViewShot || {
|
|
captureScreen: jest.fn(),
|
|
};
|
|
|
|
jest.mock('react-native-file-access', () => jest.fn());
|
|
jest.mock('react-native-share', () => jest.fn());
|