https://kotlinlang.org logo
k

kpgalligan

10/09/2018, 4:20 PM
I'm sure this has been repeatedly asked/answered, but how do you actually run tests in the mpp?
I created a sample multiplatform project with intellij. Looks like native isn't actually built without an explicit output kind. See how this goes...
s

Sam

10/09/2018, 4:23 PM
I think you have to run the tests for the individual platforms. I found it easier to iterate by just running jvm tests first and then verify on all periodically.
2
k

kpgalligan

10/09/2018, 4:25 PM
I'm explicitly trying to run some native stuff to play around with the runtime, so I need native. Clion plugin appears to be not functional today for some reason
t

tarek

10/09/2018, 4:29 PM
Native is not supported by IDEA CE as of today. I had to run tests with gradle. For js, I think that nothing is supported on IDEA CE. It just generates the js file and the js test file. I wrote a simple HTML web page that runs the test in browser with mocha and a gradle task to launch it. You can have a look at it here : https://github.com/tokou/coinche
o

orangy

10/09/2018, 4:51 PM
I just get a Run Configuration from the Gradle window and run tests on native from there
k

kpgalligan

10/09/2018, 5:09 PM
I generally run from command line. Updated config to look more like coinche. See how it goes.
Yes! Failed!
Thanks
r

russhwolf

10/09/2018, 5:30 PM
There’s also ios-specific config for running device/simulator tests in the kotlin-mpp-example, if you haven’t seen that yet https://github.com/JetBrains/kotlin-mpp-example/blob/master/greeting/build.gradle#L80-L92
3 Views