what's the common way to test `suspend` functions ...
# spring
r
what's the common way to test
suspend
functions in Tests?
runBlockingTest {..}
from kotlinx-coroutines-test or is there some spring equivalent?
j
I'm just using runBlocking, and - when needed -
Copy code
private val mainThreadSurrogate = newSingleThreadContext("UI thread")

    @Before
    fun setUp() {
        Dispatchers.setMain(mainThreadSurrogate)
    }
­čĹŹ 1