-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
How to mock with await for ? #108
Comments
Hi @woprandi 👋 Are you able to provide a link to a minimal reproduction sample? It would be much easier to help if I'm able to run/debug the issue locally, thanks! 🙏 |
@felangel well, what's the problem with the code I posted ? |
It's not clear what versions of dependencies you're using are and what environment you're running in. It would be much easier to help if you could provide a link to a GitHub repo that I could clone and run to reproduce the issue. I can try to put together an example based on the snippets you provided but it's always much easier and less time consuming to investigate when there is a minimal reproduction sample that can quickly be cloned/run. |
OK you can clone here https://github.com/woprandi/flutter_playground |
@felangel Were you able to take a look ? |
@woprandi is this still an issue? This fell off my radar, apologies :( |
@felangel No problem I didn't remember about this issue. I don't know if it's still relevant. I'd need to take 5 min to retry |
Closing for now since this issue is quite old and there isn't a minimal reproduction sample. If this is still a problem please file a new issue with a link to a reproduction sample, thanks! |
I have this kind of code
This code works.
I would like to test the automatic reconnection when websocket connection is closed (with mocktail to mock). I discovered that
stream.listen(...)
is called under the hood when usingawait for
syntax. But I'm unable to get out of the loop during test. This is what I tried.But the test fails, it does not get out the
await for
loop. How to emulate a loop exit ?I didn't get any answer on SA so maybe I'll get a fast answer here.
The text was updated successfully, but these errors were encountered: