I'm surprised "test groups" (not sure what the pro...
# kotest
c
I'm surprised "test groups" (not sure what the proper name is, I'm talking about
context
in
FunSpec
) are
suspend
. I thought JS only allowed proper tests to be asynchronous, not test groups? How is it implemented?
s
In JS tests you can't use them, it will throw an error, for exactly the reasons you describe
kotest DSL was designed before multiplatform existed, in hindsight if I was doing it again I wouldn't make the top level ones suspend
but that ship has sailed
c
Ah, well, that's a shame 😅
I have a prototype library which is able to handle nested tests on JS, but even then they don't really display properly in reports
s
Yeah, we'd have to change a lot of things. But the framework gives you a very clear message if you try to use them that you have to stick to top level tests in JS.
👍 1
c
How does the framework report test info to Gradle and other tools? From what I can gather: • JVM: regular JUnit declarations • JS: ? • Native: ?
I would assume it uses kotlin-test under the hood for JS? But the output for Native looks very different to me, is it custom?
s
for JS it uses karma or whatever, in the same manner kotlin-test does (by delegating to the methods in the underlying test fraemwork)