requestAnimationFrame warnings on tests since React 16
See original GitHub issueIs this a bug report?
Yes
Which terms did you search for in User Guide?
The issue is documented at https://facebook.github.io/react/docs/javascript-environment-requirements.html
Steps to Reproduce
- Start a project
create-react-app project
- Try to run the template tests
yarn test
Expected Behavior
I expected the testing to complete without warnings out-of-the-box (as it did pre-R16).
Actual Behavior
All tests pass, but prints message:
console.error node_modules/fbjs/lib/warning.js:33
Warning: React depends on requestAnimationFrame. Make sure that you load a polyfill in older browsers. http://fb.me/react-polyfills
Issue Analytics
- State:
- Created 6 years ago
- Reactions:60
- Comments:36 (16 by maintainers)
Top Results From Across the Web
`requestAnimationFrame` polyfill error in Jest tests
Show activity on this post. Got this error after upgrading to React when I ran my Jest unit tests: React depends on requestAnimationFrame....
Read more >requestAnimationFrame & polyfill in React 16
js:33 Warning: React depends on requestAnimationFrame. Make sure that you load a polyfill in older browsers. http://fb.me/react-polyfills Test ...
Read more >Khrystyna Skvarok - Medium
Warning : React depends on requestAnimationFrame. ... You will anyway need it if you want to use Enzyme with React 16 (check Enzyme...
Read more >Developers - requestAnimationFrame warnings on tests since React ...
Expected Behavior. I expected the testing to complete without warnings out-of-the-box (as it did pre-R16). Actual Behavior. All tests pass, but prints message ......
Read more >requestAnimationFrame and polyfill in React 16
js:33 Warning: React depends on requestAnimationFrame. Make sure that you load a polyfill in older browsers. http://fb.me/react-polyfills Test ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We’ll figure something out soon. Sorry about that. This was the biggest release we ever did, there’s also a new website we’re launching today, and between all that there’s a few kinks we still need to iron out.
Thanks for your quick replay, I just realised I met you at a meeting organised by Sapient Nitro in London.
My solution was to create
src/tempPolyfills.js
src/setupTests.js
Thanks