Package Exports
- mock-request-animation-frame
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mock-request-animation-frame) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Mock Request Animation Frame
This helper function is intended to be used with Jest. It will fully mock a request animation frame (RAF).
This will come in really handy if you are running tests on components that use Adobe React Spectrum.
Getting started
You will have to call this helper function in each test file that will encounter an RAF while executing, see the example below for details on how to use it.
Example
Here is an example of how to implement this function.
// one-of-your-test-files
import mockRequestAnimationFrame from 'mock-request-animation-frame';
mockRequestAnimationFrame();
// Run your tests here :)