Join Slack
Powered by
When I step through the code it fails on uiScope.l...
# coroutines
s
Saiedmomen
01/12/2019, 9:18 AM
When I step through the code it fails on uiScope.launch {...} where uiScope is defined:
-.kt
Saiedmomen
01/12/2019, 9:20 AM
It is as if Dispatcher.Main isn't replaced or it is replaced by another one that is also android dependent
d
Dico
01/12/2019, 9:37 AM
Are you not running on Android? It's obvious from the error message that there is no main dispatcher.
Dico
01/12/2019, 9:37 AM
You may need kotlinx-coroutines-android dependency
s
Saiedmomen
01/12/2019, 9:39 AM
I'm trying to run a junit test for an android ViewModel. please take a look at preceding posts in the channel
Saiedmomen
01/12/2019, 9:40 AM
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
Dico
01/12/2019, 9:51 AM
Ah, I didn't see those sorry
4
Views
Open in Slack
Previous
Next