Massive/jestSetup.ts

22 lines
728 B
TypeScript
Raw Normal View History

2023-01-01 01:32:10 +00:00
import {NativeModules} from 'react-native'
2023-01-01 02:20:56 +00:00
import 'react-native-gesture-handler/jestSetup'
2023-01-01 01:32:10 +00:00
NativeModules.RNViewShot = NativeModules.RNViewShot || {
captureScreen: jest.fn(),
2022-10-31 04:22:08 +00:00
}
2023-01-01 01:32:10 +00:00
NativeModules.SettingsModule = NativeModules.SettingsModule || {
ignoringBattery: jest.fn(),
is24: jest.fn(() => Promise.resolve(true)),
}
2022-10-31 04:22:08 +00:00
jest.mock('react-native-file-access', () => jest.fn())
jest.mock('react-native-share', () => jest.fn())
jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper')
2023-01-01 01:32:10 +00:00
jest.mock('react-native/Libraries/EventEmitter/NativeEventEmitter')
2023-01-01 05:33:03 +00:00
jest.mock('react-native-reanimated', () => {
const Reanimated = require('react-native-reanimated/mock')
Reanimated.default.call = () => {}
return Reanimated
})