-
Notifications
You must be signed in to change notification settings - Fork 271
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
Use clock package in _TimeIntervalStreamSink (and maybe others) #660
Comments
Sound reasonable! |
@hoc081098 wow, that was quick!! |
As a heads up, we intentionally removed Therefore, I'd be careful with this change, since it might give folks the impression that it's safe to use FakeAsync, but the fundamental issues are still unsolved. Please see these discussions: |
Oh, very good point! I wasn't aware of this at all. |
+1 This is very much needed, but the FakeAsync's problem seems also big... |
However, I see the flutter repo itself uses fake_async a lot. Indeed testWidgets by default uses it. How did they solve the problem? |
Hello, any update on this? |
In order to deterministically test async code, the
fakeAsync
package currently seems to be the way to go.Unfortunately, it cannot modify the
StopWatch
fromdart:core
, and instead it is recommended to use theclock
package which describes itself asWould it be possible to use this package in
_TimeIntervalStreamSink
and possibly other places, in order to allow deterministic testing usingfakeAsync
?I'd be happy to contribute a corresponding PR!
The text was updated successfully, but these errors were encountered: