Hello, can someone help me? How can i test method ...
# kotlintest
s
Hello, can someone help me? How can i test method like this?
Copy code
fun loadData() = MainScope().launch {

}
d
With
kotlinx-coroutines-test
library (https://github.com/Kotlin/kotlinx.coroutines/tree/master/kotlinx-coroutines-test) there a few ways to do it: using
Dispatchers.setMain()
or launching coroutine context to
launch()
function.
s
Thank you !!