1
0
mirror of https://github.com/tooot-app/app synced 2024-12-14 10:05:29 +01:00
tooot/jest/react-navigation.js
2020-12-28 00:59:57 +01:00

15 lines
514 B
JavaScript

import 'react-native-gesture-handler/jestSetup'
jest.mock('react-native-reanimated', () => {
const Reanimated = require('react-native-reanimated/mock')
// The mock for `call` immediately calls the callback which is incorrect
// So we override it with a no-op
Reanimated.default.call = () => {}
return Reanimated
})
// Silence the warning: Animated: `useNativeDriver` is not supported because the native animated module is missing
jest.mock('react-native/Libraries/Animated/src/NativeAnimatedHelper')