From 5da69295974fc2056aa1bc28e4b2ade22fe67576 Mon Sep 17 00:00:00 2001 From: Daniel Reszka Date: Sat, 14 Oct 2017 17:31:13 +0200 Subject: [PATCH] disable React 16 requestAnimationFrame warning in jest tests * ref: https://github.com/facebookincubator/create-react-app/issues/3199 --- package.json | 3 ++- yarn.lock | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index f9ad961..9722042 100644 --- a/package.json +++ b/package.json @@ -14,12 +14,13 @@ "scripts": { "start": "BROWSER=none PORT=3010 react-scripts start", "build": "react-scripts build", - "test": "react-scripts test --env=jsdom --verbose", + "test": "react-scripts test --env=jsdom --verbose --setupTestFrameworkScriptFile=raf/polyfill", "test:features": "npm run start & sleep 3 && testcafe chromium:headless features/*.test.js; EXIT_CODE=$?; kill $!; exit $EXIT_CODE", "test:once": "CI=true npm run test", "eject": "react-scripts eject" }, "devDependencies": { + "raf": "^3.4.0", "testcafe": "^0.18.0" } } diff --git a/yarn.lock b/yarn.lock index 90c911b..57e62fd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5490,6 +5490,12 @@ querystringify@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-1.0.0.tgz#6286242112c5b712fa654e526652bf6a13ff05cb" +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" + randomatic@^1.1.3: version "1.1.7" resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c"