https://kotlinlang.org logo
Title
b

Big Chungus

11/16/2020, 5:13 PM
Does anyone know what artifact to use for MPP JVM + JS setup?
s

sam

11/16/2020, 5:55 PM
kotest-framework-engine-js for js and kotest-runner-junit5-jvm for jvm
b

Big Chungus

11/16/2020, 5:56 PM
What about my common sourceSet?
s

sam

11/16/2020, 5:56 PM
you can't test common without compiling it to a target, so one of those two deps will be used for common tests too
b

Big Chungus

11/16/2020, 9:33 PM
I mean what artifact do i add to common sourceSet dependencies?
s

sam

11/16/2020, 9:47 PM
nothing, add js to your js target build, and jvm to your jvm target build, and then when you run gradle test, it will run the common tests too
If you are talking about what you need common test to be able to define tests, then you want kotest-framework-api
b

Big Chungus

11/16/2020, 9:48 PM
But then I won't have kotest dsl available in commonTest...
e.g. StringSpec
s

sam

11/16/2020, 9:48 PM
you will because kotest-framework-api brings that in
b

Big Chungus

11/16/2020, 9:48 PM
So i do need to add the framework artifact to common
s

sam

11/16/2020, 9:49 PM
framework-api yes
I suppose you could just add engine to common
and that would work as well
b

Big Chungus

11/16/2020, 9:49 PM
It doesn't until I add junit5 runtime artifact to jvm
s

sam

11/16/2020, 9:50 PM
then something is wrong in the build
b

Big Chungus

11/16/2020, 9:50 PM
Would be good to have all this in the docs for the future
s

sam

11/16/2020, 9:50 PM
Yep, if you want to contribute a PR that would be great
👍 1