I'm just now working on adding Wasm targets to Kot...
# kotest-contributors
o
I'm just now working on adding Wasm targets to Kotest. It's almost done with some limitations remaining: • wasmJs/Browser tests fail with "Disconnected (0 times) , because no message in 30000 ms", so I have those disabled for now. • wasmWasi is disabled for now as the Ktor 3.0.0-wasm2 seems to be missing that target. What I'd like to know before I'll start to dig deeper in uncharted territory: • JS tests are disabled throughout Kotest, with JS test sources commented out. Why is that? • Wouldn't proper JS tests potentially require the current dev version of the Kotest Gradle+compiler plugin (not a former one downloaded from a repository)?
s
The comment out thing is just a mistake, we should re-enable.
And yes, if we can use the gradle compiler plugin from the actual repo itself, that would be best
e
Cool to see some progress around wasm 🙂 nice work!
o
Thanks, though it seems like I'm somewhat stuck at the moment. Whenever I try to run wasmJsNodeTest, I'm getting a startup error
Copy code
> Task :wasmJsNodeTest FAILED
file:///home/oliver/Repositories/open-source/Kotlin/kotest/kotest-framework/kotest-framework-multiplatform-plugin-gradle/test-project/build/js/packages/test-project-wasm-js-test/kotlin/test-project-wasm-js-test.uninstantiated.mjs:3858
        'io.kotest.engine.describe_$external_fun' : (p0, p1) => describe(p0, p1),
                                                                ^
ReferenceError: describe is not defined
    at io.kotest.engine.describe_$external_fun (file:///home/oliver/Repositories/open-source/Kotlin/kotest/kotest-framework/kotest-framework-multiplatform-plugin-gradle/test-project/build/js/packages/test-project-wasm-js-test/kotlin/test-project-wasm-js-test.uninstantiated.mjs:3858:65)
Seems like for some reason
mocha
is not loaded, though the entire tree under
build/js
looks equivalent to what Kotlin's own test library produces.