I’m trying to run some Android tests, what did I m...
# coroutines
r
I’m trying to run some Android tests, what did I miss? I have
kotlinx-coroutines-test
in my test dependencies.
Copy code
java.lang.NullPointerException
	at kotlinx.coroutines.CoroutineContextKt.newCoroutineContext(CoroutineContext.kt:57)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:50)
	at kotlinx.coroutines.BuildersKt.launch(Unknown Source)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch$default(Builders.common.kt:47)
	at kotlinx.coroutines.BuildersKt.launch$default(Unknown Source)
Oh, I found the issue. I’m testing the Presenter here, which uses the View as CoroutineScope. I’m mocking the View.
I think I need to make my Presenter implement CoroutineScope instead