-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]: Please expose runToFrame() from sinon/fake_timers in @jest/fake-timers #14593
Comments
Yeah, happy to 🙂 Wanna send a PR? |
Yep, can do |
Awesome 👍 The work is mostly adding to types (incl. type tests) and docs I think, not necessarily the code change itself 😅 It should also throw when using legacy timers |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
🚀 Feature Proposal
Hi legends,
Could you please expose
clock.runToFrame()
from sinon/fake-timers in@jest/fake-timers
? (@jest/fake-timers
is mostly a re-export ofsinon/fake-timers
)Right now I am doing this workaround:
But this seems suboptimal as there is a bit of logic controlling how long the frame duration should be.
Motivation
I am looking to explicitly have a scheduled animation frame run in a test.
Example
Pitch
It would be helpful to be able to use the
runToFrame()
to have more explicit control over animation framesThe text was updated successfully, but these errors were encountered: