You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, TestScheduler "run mode" will patch all schedulers by default. This means that everywhere we were only using schedulers as TimestampProviders, will use the test scheduler's currently time when now() is called.
However... we're going to be breaking people's tests with a move to use Date or performance as default TimestampProviders.
I see two solutions:
Have TestScheduler temporarily monkey patch Date.now and performance.now to accommodate bare uses of things like animationFrames, etc.
Create very, very light wrappers around Date.now and Performance.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:
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: