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

iosArm64Test.Utils.kt Maven / Gradle / Ivy

Go to download

Light the way for your app's backend with functional and testable Firebase components

There is a newer version: 1.0.0-alpha12
Show newest version
import kotlinx.coroutines.*
import platform.Foundation.*

actual val context: Any? = null

actual fun runTest(test: suspend CoroutineScope.() -> Unit): Unit = runBlocking {
    val testRun = MainScope().async { test() }
    while (testRun.isActive) {
        NSRunLoop.mainRunLoop.runMode(NSDefaultRunLoopMode, NSDate.create(1.0, NSDate())
        )
        yield()
    }
    testRun.await()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy