Skip to content

Commit

Permalink
Add requestAnimationFrame shim to silence react 16 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyyap committed Jan 15, 2018
1 parent 6c78fa8 commit edbaca9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions client/app/__test__/requestAnimationFrame.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
global.requestAnimationFrame = callback => setTimeout(callback, 0);
1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"jsx",
"json"
],
"setupFiles": [ "<rootDir>/app/__test__/requestAnimationFrame.js"],
"setupTestFrameworkScriptFile": "<rootDir>/app/__test__/setup.js",
"snapshotSerializers": [
"<rootDir>/node_modules/enzyme-to-json/serializer"
Expand Down

0 comments on commit edbaca9

Please sign in to comment.