Skip to content

Commit b6a6bdb

Browse files
committed
Update tests
1 parent 7eb0a2f commit b6a6bdb

File tree

5 files changed

+31
-2265
lines changed

5 files changed

+31
-2265
lines changed

build-logic/src/main/kotlin/kotlinx/io/conventions/kotlinx-io-multiplatform.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ kotlin {
4040
@OptIn(org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl::class)
4141
wasm {
4242
nodejs()
43-
browser()
43+
// Disabled because we can't exclude some tests: https://youtrack.jetbrains.com/issue/KT-58291
44+
// browser()
4445
binaries.executable()
4546
}
4647

core/build.gradle.kts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@ kotlin {
3131
}
3232
}
3333

34+
@OptIn(org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl::class)
35+
wasm {
36+
nodejs {
37+
testTask(Action {
38+
useMocha {
39+
timeout = "300s"
40+
}
41+
filter.setExcludePatterns("*SmokeFileTest*")
42+
})
43+
}
44+
}
45+
3446
sourceSets {
3547
commonMain {
3648
dependencies {

core/wasm/src/files/PathsWasm.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55

66
package kotlinx.io.files
77

8-
import kotlinx.io.*
8+
import kotlinx.io.Sink
9+
import kotlinx.io.Source
910

1011

1112
public actual class Path internal constructor(private val path: String,
@@ -18,9 +19,9 @@ public actual fun Path(path: String): Path {
1819
}
1920

2021
public actual fun Path.source(): Source {
21-
TODO()
22+
TODO("Paths are not supported for Wasm target")
2223
}
2324

2425
public actual fun Path.sink(): Sink {
25-
TODO()
26+
TODO("Paths are not supported for Wasm target")
2627
}

core/wasm/test/utils.kt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,10 @@
55

66
package kotlinx.io
77

8-
import kotlin.random.Random
9-
import kotlin.random.nextULong
10-
118
actual fun createTempFile(): String {
12-
TODO()
9+
TODO("Paths are not supported for Wasm target")
1310
}
1411

1512
actual fun deleteFile(path: String) {
16-
TODO()
13+
TODO("Paths are not supported for Wasm target")
1714
}

0 commit comments

Comments
 (0)