Currently trying to get Kotest working for an exis...
# kotest
b
Currently trying to get Kotest working for an existing multiplatform project (JVM & JS). When running JS tests (new IR, nodejs), everything works fine when tests pass but if there's a failing test it fails with
Cause: command 'node.exe' exited with errors (exit code: 1)
and doesn't open the standard test result window (nor is there any text output for the failure). I cloned https://github.com/kotest/kotest-examples-multiplatform and tried to replicate it there with
nodejs
, and I get a different node execution error. I did check to update node and everything but all seems good on my side, any ideas?
Digging around through issues I found https://github.com/kotest/kotest/issues/3329 - looks like there was a fix attempted but the issue persists. Running Kotest 5.6.1 and Kotlin 1.8.21 so everything should be up to date.
@Emil Kantis Pardon the tag, is this being an open issue still known? Unsure what the status is and I'm not able to find any links to PRs/commits that resulted in the other issue being closed. I'm happy to help try to fix this but I don't have any info to go on atm.
e
No worries.. I don't use Kotlin/JS that much, so I don't really know for sure. According to the issue it seems to persist though.
Kotest works using the compiler plugin, which generates code for JS that executes the test.. I think we rely on kotlin-test's behaviour, which has changed at some point (probably 1.7, I think it was working fine at 1.6)
I think kotlin-test went from doing a single execution to discover + run tests, to splitting it up into a disocvery phase, and one execution phase.. And I think that Kotest puts the execution in discovery phase which causes the issues.. but lots of guessing here..
e
@sam Sorry for tagging you, you seem to me like the inside guy to Kotest 😅 I've had the same issue as described here. Added some debug info to the https://github.com/kotest/kotest/issues/3329 ticket. The result of this issue is that we cannot use Kotest for our project at the moment, because it's hard for us to distinguish between a failing test and e.g. some kind of problem with the compiled JS, and even if we understand that this error output is because of a failing test, we don't know which one.