All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jvmTest.util.coroutine.kt Maven / Gradle / Ivy

There is a newer version: 0.20.6-alpha1
Show newest version
package util

import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.asCoroutineDispatcher
import kotlinx.coroutines.runBlocking
import java.util.concurrent.Executors
import kotlin.coroutines.CoroutineContext

actual val testCoroutineContext: CoroutineContext = Executors.newSingleThreadExecutor().asCoroutineDispatcher()

actual fun runBlockingTest(block: suspend CoroutineScope.() -> Unit) = runBlocking(testCoroutineContext, block)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy