Reformat runBlockingTest implementations
This commit is contained in:
parent
eb7d0461d1
commit
a5c153477b
@ -6,5 +6,8 @@ import kotlinx.coroutines.promise
|
|||||||
|
|
||||||
import kotlin.coroutines.CoroutineContext
|
import kotlin.coroutines.CoroutineContext
|
||||||
|
|
||||||
actual fun runBlockingTest(context: CoroutineContext, testBody: suspend CoroutineScope.() -> Unit): dynamic =
|
actual fun runBlockingTest(context: CoroutineContext, testBody: suspend CoroutineScope.() -> Unit): dynamic {
|
||||||
GlobalScope.promise(context) { testBody(this) }
|
return GlobalScope.promise(context) {
|
||||||
|
testBody(this)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -5,7 +5,7 @@ import kotlinx.coroutines.runBlocking
|
|||||||
import kotlin.coroutines.CoroutineContext
|
import kotlin.coroutines.CoroutineContext
|
||||||
|
|
||||||
actual fun runBlockingTest(context: CoroutineContext, testBody: suspend CoroutineScope.() -> Unit) {
|
actual fun runBlockingTest(context: CoroutineContext, testBody: suspend CoroutineScope.() -> Unit) {
|
||||||
runBlocking {
|
return runBlocking {
|
||||||
testBody(this)
|
testBody(this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user