-
Notifications
You must be signed in to change notification settings - Fork 629
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
Update PrimaryButtonUiStateMapper to return state flow. #8394
Conversation
Diffuse output:
APK
|
) | ||
|
||
val result = mapper.forCompleteFlow() | ||
|
||
result.test { | ||
assertThat(awaitItem()).isEqualTo(usBankButton) | ||
awaitComplete() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
state flows can never complete, so this assert wouldn't pass.
We don't actually rely on this behavior, or use it in our production codepaths, so it's safe to remove.
test also ensure we consumed all the events, so we're safe there.
908ed55
to
8be1fc0
Compare
Pull request was converted to draft
ec2cf40
to
c31645a
Compare
f5493dc
to
3569316
Compare
Summary
Continuing to move away from stateIn if we can avoid it. This is for PrimaryButtonUiStateMapper. We can't actually do the combineAsStateFlow in PrimaryButtonUiStateMapper, but this will get us ready to do it.