natpryce
02/18/2019, 3:55 PMian.shaun.thomas
02/18/2019, 4:00 PMnatpryce
02/18/2019, 4:02 PMian.shaun.thomas
02/18/2019, 4:03 PMid 'com.github.salomonbrys.gradle.kotlin.js.mpp-tests.node'
in the plugins and then the JS configuration block in the targetsfromPreset(presets.js, 'js') {
tasks[compilations.main.compileKotlinTaskName].kotlinOptions.moduleKind = "umd"
kotlinJsNodeTests {
thisTarget(js) {
engine = mocha
}
}
mavenPublication {
artifactId = 'arbor-js'
}
}
natpryce
02/18/2019, 4:03 PMian.shaun.thomas
02/18/2019, 4:04 PMnatpryce
02/18/2019, 4:05 PMian.shaun.thomas
02/18/2019, 4:05 PMnatpryce
02/18/2019, 4:05 PMian.shaun.thomas
02/18/2019, 4:06 PMnatpryce
02/18/2019, 4:09 PMian.shaun.thomas
02/18/2019, 4:09 PMnatpryce
02/18/2019, 4:13 PMian.shaun.thomas
02/18/2019, 4:14 PMnatpryce
02/18/2019, 4:15 PMian.shaun.thomas
02/18/2019, 4:17 PMcom.github.salomonbrys.gradle.kotlin.js.mpp-tests.node
builds upon (it uses that same plugin)natpryce
02/18/2019, 4:17 PMian.shaun.thomas
02/18/2019, 4:18 PMnatpryce
02/18/2019, 4:19 PMian.shaun.thomas
02/18/2019, 4:20 PMMore so than the Kotlin JVM compiler, because test code is targetted to the test framework by the compilerthat's not the case, you define amd/umd/js but qunit and others are what you are passing to the node plugin
natpryce
02/18/2019, 4:22 PMian.shaun.thomas
02/18/2019, 4:25 PMgildor
02/19/2019, 12:28 AMian.shaun.thomas
02/19/2019, 1:09 AMgildor
02/19/2019, 1:54 AMian.shaun.thomas
02/19/2019, 1:55 AMgildor
02/19/2019, 1:56 AMian.shaun.thomas
02/19/2019, 2:17 AMnatpryce
02/19/2019, 8:48 AMkotlin.targets.fromPreset(presets.jvm, "jvm")
etc. instead of jvm("jvm")
, etc.?gildor
02/19/2019, 8:52 AMnatpryce
02/19/2019, 8:52 AMgildor
02/19/2019, 8:53 AMnatpryce
02/19/2019, 9:05 AMgildor
02/19/2019, 9:31 AMnatpryce
02/19/2019, 10:28 AMA problem occurred evaluating script.
> Cannot access first() element from an empty Iterable
From the argument passed to Mocha: relativePath("${jsCompilations.test.output.classesDirs.first()}/${project.name}_test.js")
gildor
02/19/2019, 10:29 AMnatpryce
02/19/2019, 10:29 AMrelativePath(jsCompilations.test.output.allOutputs.first()) + "/${project.name}_test.js"
gildor
02/19/2019, 2:05 PMnatpryce
02/19/2019, 2:57 PM