https://kotlinlang.org logo
Title
u

user

07/21/2022, 7:41 AM
Accessing ViewModle MutableState from unit tests' Dispatcher? I am using MutableStates in the ViewModel for Compose var desiredDate: MutableState = mutableStateOf(null) and additionally I want to receive changes of the state inside the model snapshotFlow { desiredDate.value } .onEach { updateConfirmationState() } .launchIn(viewModelScope) and this works quite fine as productive code. Now I want to test updating one state causes update of other in unit tests. I am using classical MainCoroutineRule to override the...