<Unit testing Android ViewModel with a StateFlow t...
# stackoverflow
u
Unit testing Android ViewModel with a StateFlow that mapsLatest from another StateFlow but the mapLatest is never triggered So I have a ViewModel I'm trying to unit test. It is using the stateIn operator. I found this documentation about how to test stateflows created using the stateIn operator https://developer.android.com/kotlin/flow/test but the mapLatest never triggers even though I'm collecting the flow. class DeviceConfigurationViewModel( val systemDetails: SystemDetails, val step:...