Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// Common
@Suppress("UnusedPrivateMember")
internal expect fun <T> runTest(block: suspend () -> T)
// Android
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.runBlockingTest
@UseExperimental(ExperimentalCoroutinesApi::class)
internal actual fun <T> runTest(block: suspend () -> T) {
runBlockingTest { block() }
}
// iOS
import kotlinx.coroutines.runBlocking
internal actual fun <T> runTest(block: suspend () -> T) {
runBlocking { block() }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.