Skip to content

Commit 6ea5657

Browse files
committed
Enable wasm compatibility tests
1 parent c112d92 commit 6ea5657

File tree

5 files changed

+3
-17
lines changed

5 files changed

+3
-17
lines changed

.github/workflows/run-tests-compatibility.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
os: [ 'ubuntu-latest' ]
21-
target: [ 'jvm', 'js', 'native' ]
21+
target: [ 'jvm', 'js', 'wasm', 'native' ]
2222
include:
2323
- os: 'macos-latest'
2424
target: 'macos'
@@ -66,7 +66,7 @@ jobs:
6666
fail-fast: false
6767
matrix:
6868
os: [ 'ubuntu-latest' ]
69-
target: [ 'jvm', 'js', 'native' ]
69+
target: [ 'jvm', 'js', 'wasm', 'native' ]
7070
include:
7171
- os: 'macos-latest'
7272
target: 'macos'

.github/workflows/run-tests-default.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
os: [ 'ubuntu-latest' ]
17-
target: [ 'jvmAll', 'js', 'native' ]
17+
target: [ 'jvmAll', 'js', 'wasm', 'native' ]
1818
include:
19-
- os: 'macos-latest'
20-
target: 'wasm'
2119
- os: 'macos-latest'
2220
target: 'macos'
2321
- os: 'macos-latest'

cryptography-providers-tests-api/src/commonMain/kotlin/compatibility/CompatibilityTest.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,18 @@ abstract class CompatibilityTest<A : CryptographyAlgorithm>(
1515
abstract suspend fun CompatibilityTestScope<A>.generate(isStressTest: Boolean)
1616
abstract suspend fun CompatibilityTestScope<A>.validate()
1717

18-
@WasmIgnore
1918
@Test
2019
fun generateStep() = testWithAlgorithm {
2120
val logger = logger.child("GENERATE")
2221
runCompatibilityTestStep(logger, ServerApi(algorithmId.name, context, logger)) { generate(isStressTest = false) }
2322
}
2423

25-
@WasmIgnore
2624
@Test
2725
fun generateStressStep() = testWithAlgorithm {
2826
val logger = logger.child("GENERATE")
2927
runCompatibilityTestStep(logger, ServerApi(algorithmId.name, context, logger)) { generate(isStressTest = true) }
3028
}
3129

32-
@WasmIgnore
3330
@Test
3431
fun validateStep() = testWithAlgorithm {
3532
val logger = logger.child("VALIDATE")

cryptography-providers-tests-api/src/commonMain/kotlin/utils.kt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,3 @@ fun Buffer.bufferedSource(): Source = (this as RawSource).buffered()
7171
fun Buffer.bufferedSink(): Sink = (this as RawSink).buffered()
7272

7373
expect fun disableJsConsoleDebug()
74-
75-
// Wasm tests on browser cannot be filtered: https://youtrack.jetbrains.com/issue/KT-58291
76-
@OptIn(ExperimentalMultiplatform::class)
77-
@OptionalExpectation
78-
expect annotation class WasmIgnore()

cryptography-providers-tests-api/src/wasmJsMain/kotlin/TestPlatform.wasmJs.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44

55
package dev.whyoleg.cryptography.providers.tests.api
66

7-
import kotlin.test.*
8-
9-
actual typealias WasmIgnore = Ignore
10-
117
internal actual val currentTestPlatform: TestPlatform = jsPlatform().run {
128
when {
139
isNode -> TestPlatform.WasmJs.NodeJS(

0 commit comments

Comments
 (0)