From 7532598937198bef0fce344b3521f9e3c5044755 Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 23 Nov 2017 13:18:50 +0800 Subject: [PATCH] Fix test case --- tests/setupTests.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/setupTests.js b/tests/setupTests.js index bb003dda..c1d57d6b 100644 --- a/tests/setupTests.js +++ b/tests/setupTests.js @@ -1,5 +1,8 @@ /* eslint-disable import/first */ -import '../src/polyfill'; +global.requestAnimationFrame = + global.requestAnimationFrame || function requestAnimationFrame(callback) { + setTimeout(callback, 0); + }; import { jsdom } from 'jsdom'; import Enzyme from 'enzyme'; import Adapter from 'enzyme-adapter-react-16'; -- GitLab