When I step through the code it fails on uiScope.l...
# coroutines
s
When I step through the code it fails on uiScope.launch {...} where uiScope is defined:
It is as if Dispatcher.Main isn't replaced or it is replaced by another one that is also android dependent
d
Are you not running on Android? It's obvious from the error message that there is no main dispatcher.
You may need kotlinx-coroutines-android dependency
s
I'm trying to run a junit test for an android ViewModel. please take a look at preceding posts in the channel
There is a way of replacing Dispatcher.Main for testing as mentioned in the exception message but somehow it isn't working in this instance
d
Ah, I didn't see those sorry