Skip to content

Commit 47e2045

Browse files
committed
use test context for desktop
1 parent 01afa60 commit 47e2045

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,6 @@ kotlin {
301301
implementation("androidx.appcompat:appcompat:1.3.1")
302302
}
303303
}
304-
305304
val androidTest by getting {
306305
dependencies {
307306
implementation(kotlin("test-junit"))

src/desktopTest/kotlin/com.adamratzman.spotify/CommonImpl.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ actual fun Exception.stackTrace() = printStackTrace()
1616

1717
val testCoroutineContext: CoroutineContext = MainScope().coroutineContext
1818
actual fun runBlockingTest(block: suspend CoroutineScope.() -> Unit) =
19-
runBlocking { block() }
19+
runBlocking(testCoroutineContext) { block() }

0 commit comments

Comments
 (0)