-
-
Notifications
You must be signed in to change notification settings - Fork 3.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
feat: Support time manipulation in bloc_test with clock/fakeAsync #4048
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
I have a block which executes a network access via a usecase. It waits 20 seconds for a response before the future throws a timeout and a FailureState is emitted.
I wanted to use the Clock&FakeAsync package to avoid having to wait 20 seconds in the BlocTest in the event of an error.
For "manual" Bloc tests, the entire test content can simply be wrapped:
This advances the time by 21 seconds and simulates a timeout without actually having to wait 21 seconds.
Desired Solution
Could this option also be supported for BlocTests?
I suspect that the complete content of testBloc would have to be wrapped internally with
FakeAsync
and the time would have to be fast-forwarded after the call ofact
The text was updated successfully, but these errors were encountered: