-
Notifications
You must be signed in to change notification settings - Fork 3k
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
TimestampProviders and TestScheduler "run mode" #5475
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently,
TestScheduler
"run mode" will patch all schedulers by default. This means that everywhere we were only using schedulers asTimestampProvider
s, will use the test scheduler's currently time whennow()
is called.However... we're going to be breaking people's tests with a move to use
Date
orperformance
as defaultTimestampProviders
.I see two solutions:
TestScheduler
temporarily monkey patchDate.now
andperformance.now
to accommodate bare uses of things likeanimationFrames
, etc.Date.now
andPerformance.now
that are used internally (but not exported, yet) that we monkey patch when we are in run mode.I'm inclined to say that #2 is the best answer, and the least likely to break others.
The text was updated successfully, but these errors were encountered: