-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[patch] fixing issues with updates and wasm
- Loading branch information
1 parent
9db6034
commit a2b828b
Showing
14 changed files
with
14 additions
and
71 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[plugins] | ||
com-github-sghill-distribution-sha = "com.github.sghill.distribution-sha:0.4.0" | ||
com-zegreatrob-tools-digger = "com.zegreatrob.tools.digger:1.4.27" | ||
com-zegreatrob-tools-tagger = "com.zegreatrob.tools.tagger:1.4.27" | ||
com-zegreatrob-tools-digger = "com.zegreatrob.tools.digger:1.5.21" | ||
com-zegreatrob-tools-tagger = "com.zegreatrob.tools.tagger:1.5.21" | ||
nl-littlerobots-version-catalog-update = "nl.littlerobots.version-catalog-update:0.8.4" |
3 changes: 2 additions & 1 deletion
3
libraries/async/src/jsMain/kotlin/com/zegreatrob/testmints/async/Async.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
package com.zegreatrob.testmints.async | ||
|
||
import kotlinx.coroutines.await | ||
import kotlin.js.Promise | ||
|
||
actual suspend fun waitForTest(testFunction: () -> kotlinx.coroutines.test.TestResult) { | ||
testFunction().await() | ||
testFunction().unsafeCast<Promise<Unit>>().await() | ||
} | ||
|
||
actual fun <T> eventLoopProtect(thing: () -> T) = thing() |
8 changes: 6 additions & 2 deletions
8
...aries/async/src/wasmJsMain/kotlin/com/zegreatrob/testmints/async/TestStyleAsync.wasmJs.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
package com.zegreatrob.testmints.async | ||
|
||
import kotlinx.coroutines.await | ||
import kotlinx.coroutines.test.TestResult | ||
import kotlin.js.Promise | ||
|
||
actual suspend fun waitForTest(testFunction: () -> kotlinx.coroutines.test.TestResult) { | ||
testFunction().await<Any>() | ||
actual suspend fun waitForTest(testFunction: () -> TestResult) { | ||
val testResult = testFunction() | ||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE", "CAST_NEVER_SUCCEEDS") | ||
(testResult as JsAny).unsafeCast<Promise<JsAny>>().await<JsAny?>() | ||
} | ||
|
||
actual fun <T> eventLoopProtect(thing: () -> T): T = thing() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file was deleted.
Oops, something went wrong.