https://kotlinlang.org logo
#kotest
Title
# kotest
s

simon.vergauwen

06/02/2021, 12:56 PM
Hey everyone, We're currently in the progress of making Arrow MPP, and we're having some trouble running tests on JS with Kotest 4.6.0. The tests seem to be running, but I cannot forcefully make it fails so the actual tests are never running. See the thread for an attached screenshot of the Kotest IDEA output.
You can find the relative branch/PR here: https://github.com/arrow-kt/arrow/pull/2409
s

sam

06/02/2021, 1:11 PM
Are you using IR ?
JS IR doesn't work with Kotest atm. I'm talking to jetbrains to try to get a resolution. I hope days.
🤞 2
If you compile for both ir and legacy you will know if your tests are working.
s

simon.vergauwen

06/02/2021, 1:23 PM
Ai, alright good I asked then 😄
Currently only working with IR, since I had some issues with legacy but that was related to missing dependencies. I'll try the
legacy
target agaain. Thanks for the quick reply @sam! I'll let you know if it worked.
Do you have any idea what's going on with native tests? As I understood they're not working yet?
s

sam

06/02/2021, 1:28 PM
Yeah native requires a compiler plugin
Something on our roadmap
c

christophsturm

06/02/2021, 1:35 PM
what does it need a plugin for?
s

sam

06/02/2021, 1:35 PM
The compiler finds the tests
c

christophsturm

06/02/2021, 1:36 PM
ah makes sense.
s

simon.vergauwen

06/02/2021, 1:48 PM
kotlin-test
also doesn't have a solution for this yet, right? So also no way to somehow piggy-back on that.
s

sam

06/02/2021, 1:48 PM
As far as I know, no
We could probably do something easily where you register the tests manually
s

simon.vergauwen

06/02/2021, 1:50 PM
Maybe we can collaborate on something, perhaps @raulraja has some idea on how we could easily scan a test code base to register the tests using Arrow Meta.
s

sam

06/02/2021, 1:50 PM
Ok
r

raulraja

06/02/2021, 1:58 PM
yeah whether you want to do it with meta or a compiler plugin happy to help where I can. I believe if you are just scanning for tests and need to gather them at compile time to instantiate them this can be done with the IR phase. It may look like traversing the tree and scanning for annotations then generating the registration function or whatever you need to run with the gathered tests.
s

sam

06/02/2021, 5:12 PM
It should be fairly easy to do - similar to what we do in the intellij plugin, except that uses the PSI AST and I guess the plugin has some other (similar) AST.
3 Views