Animated的官方文档:https://facebook.github.io/react-native/docs/animated
解决方案 mock function + jest.useFakeTimers();
注意:mock function一定要mock到最外面一层,否则mock start()方法时会报错 TypeError: animation._isUsingNativeDriver is not a function
Animated的官方文档:https://facebook.github.io/react-native/docs/animated
解决方案 mock function + jest.useFakeTimers();
注意:mock function一定要mock到最外面一层,否则mock start()方法时会报错 TypeError: animation._isUsingNativeDriver is not a function