# multiplatform

Brandon Saunders

11/07/2019, 7:45 PM
hi everyone, small, what feels like a newbie question. I'm looking into using kotlin multiplatform to build some libraries for android/ios and javascript. I'm getting stuck on the gradle JS setup for our unit tests though. It seems most docs online use kotlin2js for doing things like installing mocha and populating nodemodules, but adding the kotlin2JS module with the multiplatform module returns the following error
Cannot add extension with name 'kotlin', as there is an extension already registered with that name.
This link,, seems to suggest that support docs for multiplatform JS gradle is getting updated. Does anyone know if this is still accessible (I can't seem to connect to it via slack) or has an example gradle file that uses multiplatform to trigger a mocha run? Thank you!

Jurriaan Mous

11/07/2019, 7:54 PM
Since Kotlin 1.3.40 this nodemodules populating and test setup is built in. Read more about it in the release blog.
Good to know: currently the IDE does not show the test results like the JVM. They are in the build/reports dir as HTML. To make test failures more apparant in Gradle you can use
Copy code
nodejs {
            testTask {
                testLogging {
                    events = ["FAILED", "SKIPPED"]
This in IDE results is in progress and looks now to be scheduled for 1.3.70

Brandon Saunders

11/07/2019, 8:37 PM
ah awesome, thank you! This seems exactly what I needed.