Skip to content

Commit a09e51b

Browse files
fzhinkinSpace Team
authored andcommitted
Supress warnings emitted during Wasm and JS tests compilation
- Opted into ExperimentalWasmJsInterop - Supressed a "cast will always fail" warning Merge-request: KT-MR-23830 Merged-by: Filipp Zhinkin <[email protected]>
1 parent 43a127e commit a09e51b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

libraries/kotlin.test/wasm/js/src/test/kotlin/AdapterTransformerTest.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ package kotlin.test.tests
77

88
import kotlin.test.*
99

10+
@OptIn(ExperimentalWasmJsInterop::class)
1011
private fun wrapAdapter(externalAdapter: ExternalFrameworkAdapter): ExternalFrameworkAdapter = js("""{
1112
return {
1213
suite: (name, ignored, suiteFn) => externalAdapter.suite(name, ignored, suiteFn),
@@ -20,6 +21,7 @@ private class TestAdapter : FrameworkAdapter {
2021
override fun test(name: String, ignored: Boolean, testFn: () -> Any?) { testResult = testFn() }
2122
}
2223

24+
@OptIn(ExperimentalWasmJsInterop::class)
2325
class AdapterTransformerTest {
2426
@Test
2527
fun loopAround() {

libraries/kotlin.test/wasm/js/src/test/kotlin/AsyncTest.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import kotlin.test.*
1010

1111
private external fun setTimeout(body: () -> Unit, timeout: Int)
1212

13+
@OptIn(ExperimentalWasmJsInterop::class)
1314
class AsyncTest {
1415

1516
var log = ""
@@ -58,6 +59,7 @@ class AsyncTest {
5859

5960
@Test
6061
fun checkCustomPromise(): CustomPromise {
62+
@Suppress("CAST_NEVER_SUCCEEDS")
6163
return promise(10, "") as CustomPromise
6264
}
6365

0 commit comments

Comments
 (0)