functions aren’t mockable (and not spyable from what I can tell?)
does anyone have strategies for verifying that calls to a `MutableStateFlow`’s
inline fun <T> MutableStateFlow<T>.update(function: (T) -> T)
is invoked with the correct argument (or invoked at all)?
p
Peter Farlow
03/14/2022, 3:49 PM
I would probably avoid mocking a MutableStateFlow object and use a library like Turbine for verifying the value ends up being what I expect it to be https://github.com/cashapp/turbine