Oliver.O
12/23/2023, 4:18 PMjsBrowserTest
, jsNodeTest
, wasmJsBrowserTest
, but not wasmJsNodeTest
.
2. For wasmJsNodeTest
with Kotest, I'm using Kotest's own runner via DefaultSpecExecutorDelegate(defaultCoroutineDispatcherFactory, context)
, in conjunction with Kotest's TeamCity reporting, which works well.
3. I also have a solution for https://github.com/kotest/kotest/issues/3329. To fix test reporting for jsNodeTest
, we'd have to use a transformation function of the KGP-provided kotlin-test-js-runner
. While possible, this would tie us to an internal, undocumented Kotlin API.
4. Then there are nested tests, which are not currently supported on JS.
Taking this into account: Do we actually need to use an external test runner? Can't we just make Kotest use its own runners on all platforms, including JS, and drop interfacing with Mocha altogether?Emil Kantis
12/23/2023, 5:24 PMOliver.O
12/23/2023, 5:26 PMsam
12/23/2023, 6:50 PMOliver.O
12/23/2023, 7:00 PMwasm
targets. They are still using it on JS/browser, probably due to the existing Karma-integration. But Karma is deprecated anyway. And as the Kotest Gradle plugin must be used on non-JVM targets, we could provide our own test run targets and use whatever Karma replacement we'd like and from there just use existing Kotest runners with full structured coroutine support as on the JVM.
Maybe right now we could just package all Kotest tests into one overarching Mocha test on JS, and just use our own runner and test reporting inside?sam
12/23/2023, 7:41 PMsam
12/23/2023, 7:42 PMsam
12/23/2023, 7:44 PMMaybe right now we could just package all Kotest tests into one overarching Mocha test on JS, and just use our own runner and test reporting inside?This is an interesting idea that might mean we could support async at all levels. We could have a top level describe test just called "kotest" and then have all our tests inside a single "it" which we then break down and report on. We'd have to play around with the way the test frameworks output results, because right now its mocha/karma that's doing the report generation and if we did a single test it would output as a single test.
sam
12/23/2023, 7:46 PMOliver.O
12/23/2023, 8:00 PMwasm
target PR getting reviewed and merged first, as it has already moved partially along that path (for wasmJsNodeTest
). OK to proceed that way?sam
12/23/2023, 8:00 PM