Skip to content

requestAnimationFrame does not invoke callback (v22, jsdom: latest version) #5147

Description

@oookli

Do you want to request a feature or report a bug?
A bug

What is the current behavior?
The requestAnimationFrame doesn't invoke callback. Maybe it happened because the jsdom is using setTimeout under the hood, but useFakeTimers and runAllTimers not helping.

If the current behavior is a bug, please provide the steps to reproduce and
either a repl.it demo through https://repl.it/languages/jest or a minimal
repository on GitHub that we can yarn install and yarn test.

  1. Use requestAnimationFrame on your code
  2. try to test what is happened inside callback

What is the expected behavior?
requestAnimationFrame should invoke its callback

Please provide your exact Jest configuration and mention your Jest, node,
yarn/npm version and operating system.

OS: High Sierra
node: 8.9.1
jest: 22.0.3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions