Skip to content

feat: Flush animation frames every 16ms when using legacy timers#11567

Merged
SimenB merged 5 commits intojestjs:masterfrom
eps1lon:feat/legacy-fake-timers/raf
Jun 14, 2021
Merged

feat: Flush animation frames every 16ms when using legacy timers#11567
SimenB merged 5 commits intojestjs:masterfrom
eps1lon:feat/legacy-fake-timers/raf

Conversation

@eps1lon
Copy link
Copy Markdown
Contributor

@eps1lon eps1lon commented Jun 14, 2021

Summary

Closes #11565

Defaulting to 60fps target for animation frames which matches jsdom.

Test plan

  • CI green (failures look unrelated)

@eps1lon eps1lon force-pushed the feat/legacy-fake-timers/raf branch from 5d13bc5 to 26dc18c Compare June 14, 2021 09:12
Copy link
Copy Markdown
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

Comment thread packages/jest-fake-timers/src/legacyFakeTimers.ts Outdated
Comment thread e2e/fake-time/modern/requestAnimationFrame/__tests__/test.js Outdated
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jun 14, 2021

Codecov Report

Merging #11567 (806e5fa) into master (d1882f2) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11567      +/-   ##
==========================================
+ Coverage   68.94%   68.95%   +0.01%     
==========================================
  Files         312      312              
  Lines       16314    16325      +11     
  Branches     4726     4730       +4     
==========================================
+ Hits        11247    11257      +10     
- Misses       5039     5040       +1     
  Partials       28       28              
Impacted Files Coverage Δ
packages/jest-fake-timers/src/legacyFakeTimers.ts 94.87% <100.00%> (+0.25%) ⬆️
packages/expect/src/utils.ts 95.58% <0.00%> (-0.56%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d1882f2...806e5fa. Read the comment docs.

@eps1lon

This comment has been minimized.

Comment thread packages/jest-fake-timers/src/legacyFakeTimers.ts
Comment thread packages/jest-fake-timers/src/legacyFakeTimers.ts Outdated
@eps1lon eps1lon marked this pull request as ready for review June 14, 2021 10:25
@SimenB SimenB merged commit aeb1ab5 into jestjs:master Jun 14, 2021
@eps1lon eps1lon deleted the feat/legacy-fake-timers/raf branch June 14, 2021 11:57
@SimenB
Copy link
Copy Markdown
Member

SimenB commented Jun 22, 2021

@github-actions
Copy link
Copy Markdown

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jul 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

requestAnimationFrame callbacks are never called with legacy fake timers when advancing time

4 participants