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.
When testing a component that has a call to
Animated.spring()
, tests would crash when stopping the animation. The crash happened because the functionwindow.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.