summaryrefslogtreecommitdiff
path: root/src/jsTest/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'src/jsTest/kotlin')
-rw-r--r--src/jsTest/kotlin/ProjectConfig.kt7
-rw-r--r--src/jsTest/kotlin/io/PathTest.kt47
2 files changed, 30 insertions, 24 deletions
diff --git a/src/jsTest/kotlin/ProjectConfig.kt b/src/jsTest/kotlin/ProjectConfig.kt
new file mode 100644
index 0000000..cf0f15d
--- /dev/null
+++ b/src/jsTest/kotlin/ProjectConfig.kt
@@ -0,0 +1,7 @@
+import io.kotest.core.config.AbstractProjectConfig
+
+class ProjectConfig : AbstractProjectConfig() {
+ override suspend fun beforeProject() {
+ println("HELLO")
+ }
+}
diff --git a/src/jsTest/kotlin/io/PathTest.kt b/src/jsTest/kotlin/io/PathTest.kt
index 2649a2a..73667a6 100644
--- a/src/jsTest/kotlin/io/PathTest.kt
+++ b/src/jsTest/kotlin/io/PathTest.kt
@@ -1,32 +1,31 @@
package io
-import io.kotest.core.spec.style.DescribeSpec
+import io.kotest.core.spec.style.FunSpec
+import io.kotest.matchers.booleans.shouldBeFalse
import io.kotest.matchers.types.shouldBeTypeOf
-class PathTest : DescribeSpec({
- describe("Path") {
- val homeDir = Path.of("/home") as Path.Absolute
- it("recognize relative paths as such") {
- listOf(
- Path.of("a/b"),
- Path.of("."),
- Path.of("a", "b"),
- Path.ofShell("a/b", userHome = homeDir),
- Path.ofShell(".", userHome = homeDir),
- Path.ofShell("a", "b", userHome = homeDir),
- Path.ofShell(listOf("a", "b"), userHome = homeDir),
- ).forEach {
- it.shouldBeTypeOf<Path.Relative>()
- }
+class PathTest : FunSpec({
+ val homeDir = Path.of("/home") as Path.Absolute
+ test("recognize relative paths as such") {
+ listOf(
+ Path.of("a/b"),
+ Path.of("."),
+ Path.of("a", "b"),
+ Path.ofShell("a/b", userHome = homeDir),
+ Path.ofShell(".", userHome = homeDir),
+ Path.ofShell("a", "b", userHome = homeDir),
+ Path.ofShell(listOf("a", "b"), userHome = homeDir),
+ ).forEach {
+ it.shouldBeTypeOf<Path.Relative>()
}
- it("recognize absolute paths as such") {
- listOf(
- Path.of("/a/b"),
- Path.of("/"),
- Path.ofShell("/b/c", userHome = homeDir),
- ).forEach {
- it.shouldBeTypeOf<Path.Absolute>()
- }
+ }
+ test("recognize absolute paths as such") {
+ listOf(
+ Path.of("/a/b"),
+ Path.of("/"),
+ Path.ofShell("/b/c", userHome = homeDir),
+ ).forEach {
+ it.shouldBeTypeOf<Path.Absolute>()
}
}
})