From bebea64e339d496c591505f698f71a2a528d4632 Mon Sep 17 00:00:00 2001 From: Caleb Date: Sat, 11 Nov 2017 17:46:38 -0700 Subject: [PATCH] Fix requestAnimationFrame warnings in tests. --- package.json | 1 + setupTests.js | 1 + yarn.lock | 6 ++++++ 3 files changed, 8 insertions(+) diff --git a/package.json b/package.json index ec42fcb1aa85..bc9b9c152bec 100644 --- a/package.json +++ b/package.json @@ -109,6 +109,7 @@ "postcss-cssnext": "^3.0.2", "postcss-import": "^11.0.0", "postcss-loader": "^2.0.7", + "raf": "^3.4.0", "react-hot-loader": "^3.0.0-beta.7", "react-test-renderer": "^16.0.0", "style-loader": "^0.18.2", diff --git a/setupTests.js b/setupTests.js index 30ee2428671d..96261ab66bef 100644 --- a/setupTests.js +++ b/setupTests.js @@ -1,3 +1,4 @@ +import 'raf/polyfill'; import enzyme from 'enzyme'; import enzymeAdapter from 'enzyme-adapter-react-16'; diff --git a/yarn.lock b/yarn.lock index e9a9940b7693..1da45e995069 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7436,6 +7436,12 @@ raf@^3.3.2: dependencies: performance-now "^2.1.0" +raf@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.0.tgz#a28876881b4bc2ca9117d4138163ddb80f781575" + dependencies: + performance-now "^2.1.0" + railroad-diagrams@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz#eb7e6267548ddedfb899c1b90e57374559cddb7e"