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
RFC: Testing convenience API #171
Labels
enhancement
New feature or request
Comments
Further thoughts:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a list of nice to have APIs on the AppTester to make tests a little bit verbose in common cases. I'll be updating this issue as I think of them. We can also discuss them as we go, and when there's a few of them, I'll open a PR implementing them.
tester.resolve_and_update
- resolves an effect and immediately sends any resulting eventsupdate.filter_effects(Effect::into_x)
- shorthand forupdate.into_effects().filter_map(Effect::into_x)
update.first_effect(Effect::into_x)
- shorthand forupdate.into_effects().filter_map(Effect::into_x).next().ok_or(some_error)
macro combining the effect finding shorthand with
assert_let
like behaviour on the operation the effect carries, if possible. It's quite common to pull data out of the requests, while also holding onto the request in order to resolve it.E.g. something like
The text was updated successfully, but these errors were encountered: