-
Notifications
You must be signed in to change notification settings - Fork 276
Description
In order to deterministically test async code, the fakeAsync
package currently seems to be the way to go.
Unfortunately, it cannot modify the StopWatch
from dart:core
, and instead it is recommended to use the clock
package which describes itself as
This package provides a Clock class which encapsulates the notion of the "current time" and provides easy access to points relative to the current time. Different Clocks can have a different notion of the current time, and the default top-level clock's notion can be swapped out to reliably test timing-dependent code.
Would it be possible to use this package in _TimeIntervalStreamSink
and possibly other places, in order to allow deterministic testing using fakeAsync
?
I'd be happy to contribute a corresponding PR!