mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-23 20:01:01 +08:00
Add request/cancelAnimationFrame to jest setup
Reviewed By: cpojer Differential Revision: D5005587 fbshipit-source-id: 653c281df9025a75ed8eecd22a2e64eaf188bf3e
This commit is contained in:
committed by
Facebook Github Bot
parent
909fb7239d
commit
8ae4c3fcfd
@@ -111,11 +111,6 @@ describe('Animated tests', () => {
|
||||
|
||||
|
||||
it('stops animation when detached', () => {
|
||||
// jest environment doesn't have cancelAnimationFrame :(
|
||||
if (!global.cancelAnimationFrame) {
|
||||
global.cancelAnimationFrame = jest.fn();
|
||||
}
|
||||
|
||||
var anim = new Animated.Value(0);
|
||||
var callback = jest.fn();
|
||||
|
||||
|
||||
@@ -55,11 +55,6 @@ describe('Native Animated', () => {
|
||||
nativeAnimatedModule.startListeningToAnimatedNodeValue = jest.fn();
|
||||
nativeAnimatedModule.stopAnimation = jest.fn();
|
||||
nativeAnimatedModule.stopListeningToAnimatedNodeValue = jest.fn();
|
||||
|
||||
// jest environment doesn't have cancelAnimationFrame :(
|
||||
if (!global.cancelAnimationFrame) {
|
||||
global.cancelAnimationFrame = jest.fn();
|
||||
}
|
||||
});
|
||||
|
||||
describe('Animated Value', () => {
|
||||
|
||||
Reference in New Issue
Block a user