How can I write a unit test for Stateflow in the ViewModel
Stateflow in ViewModel:
private fun fetchLocation() {
viewModelScope.launch {
interactions.getLocation.invoke().collect {
locationFlow.value = it
}
}
}
val getLocation: StateFlow<String?> = locationFlow