hi! we’re trying to update our Multiplatform proje...
# kotest
a
hi! we’re trying to update our Multiplatform project to 1.9.0, and JS tests fail with
Copy code
TypeError at /Users/serras/arrow/arrow-libs/resilience/arrow-resilience/build/compileSync/js/test/testDevelopmentExecutable/kotlin/commonMainSources/libraries/stdlib/src/kotlin/time/Duration.kt:643
is there any known incompatibility with this version? I’ve tried to use the latest Kotest snapshot, but without any success
s
It's likely the 1.9 release broke things again with MPP.
Every release tends to have something breaking since we're using compiler plugins which are experimental.
I'll start on a 1.9 release (so Kotest 5.7.0) but it's likely to be 5-7 days away.
a
that sounds great! 🙂 please let me know if I can be of any help
do you prefer me to create an issue in the Kotest repo?
o
Kotest on Kotlin 1.9 user here: I'm running a local build of Kotest at commit 3143993, which works like a charm. Could that
TypeError
be unrelated to Kotest?
a
Kotest works for us in the rest of the modules, except those which use `Duration`…
o
Hmm, this one worked for me:
Copy code
import io.kotest.core.spec.style.FunSpec
import io.kotest.matchers.shouldBe
import kotlin.time.Duration
import kotlin.time.Duration.Companion.seconds

class DurationTest : FunSpec({
    test("one") {
        val totalDuration: Duration = 0.seconds
        totalDuration shouldBe 0.seconds
    }
})
Test target was:
Copy code
js {
        browser()
    }
Dependencies:
Copy code
jsTestNpmAggregated - NPM configuration for compilation 'test' (target js (js)).
[...]
+--- org.jetbrains.kotlinx:kotlinx-datetime:{require 0.4.0; reject _} -> 0.4.0
|    \--- org.jetbrains.kotlinx:kotlinx-datetime-js:0.4.0
|         +--- org.jetbrains.kotlin:kotlin-stdlib-js:1.7.0 -> 1.9.0 (*)
|         +--- org.jetbrains.kotlinx:kotlinx-serialization-core:1.3.2 -> 1.5.1 (*)
|         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.7.0 -> 1.9.0