Root-App / react-native-mock-render

a fork of react-native-mock that renders
MIT License
85 stars 50 forks source link

Fixes test failures caused by missing function #11

Closed jimmy-devine closed 7 years ago

jimmy-devine commented 7 years ago

When testing a component that has a call to Animated.spring(), tests would crash when stopping the animation. The crash happened because the function window.cancelAnimationFrame did not exist.

To solve this, I replaced the offending line with 3 lines that are in the other stop() functions for other animations. This eliminated the crash.