Paul Woitaschek
07/01/2019, 8:58 PMclass Subject(val scope: CoroutineScope) {
fun foo() {
scope.launch {
// launch uses the testScope injected in setup
}
}
}
But what do I actually pass in production code here?streetsofboston
07/01/2019, 9:01 PMMainScope()
or a viewModelScope
. Or you create one on your own: CoroutineScope(Job() + <http://Dispatchers.IO|Dispatchers.IO>)
for example