Gradle: Kotlin NodeJS tests runner for single target
#KT-30528
This commit is contained in:
+2
@@ -379,6 +379,8 @@ class Kotlin2JsGradlePluginIT : BaseGradleIT() {
|
||||
assertTrue { "kotlin-stdlib-js</artifactId><version>$kotlinVersion</version><scope>runtime</scope>" in pomText }
|
||||
|
||||
assertFileExists(moduleDir + "kotlin-js-plugin-1.0-sources.jar")
|
||||
|
||||
assertTestResults("testProject/kotlin-js-plugin-project/tests.xml", "test")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+16
-17
@@ -297,7 +297,7 @@ class MultiplatformGradleIT : BaseGradleIT() {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testMppNodeJsTestRun() = with(Project("new-mpp-js-tests", GradleVersionRequired.AtLeast("4.10.2"))) {
|
||||
fun testMppNodeJsTestRun() = with(Project("new-mpp-js-tests", GradleVersionRequired.AtLeast("5.0"))) {
|
||||
setupWorkingDir()
|
||||
gradleBuildScript().modify(::transformBuildScriptWithPluginsDsl)
|
||||
gradleSettingsScript().modify(::transformBuildScriptWithPluginsDsl)
|
||||
@@ -307,12 +307,12 @@ class MultiplatformGradleIT : BaseGradleIT() {
|
||||
assertSuccessful()
|
||||
|
||||
assertTasksRegisteredAndNotRealized(
|
||||
":clientKotlinJsNodeModules",
|
||||
":clientKotlinJsNodeModulesTestRuntime",
|
||||
":kotlinNodeJsTestRuntimeExtract",
|
||||
|
||||
":clientTestNodeModules",
|
||||
":clientTest",
|
||||
|
||||
":serverKotlinJsNodeModules",
|
||||
":serverKotlinJsNodeModulesTestRuntime",
|
||||
":serverTestNodeModules",
|
||||
":serverTest"
|
||||
)
|
||||
}
|
||||
@@ -321,12 +321,12 @@ class MultiplatformGradleIT : BaseGradleIT() {
|
||||
assertSuccessful()
|
||||
|
||||
assertTasksExecuted(
|
||||
":clientKotlinJsNodeModules",
|
||||
":clientKotlinJsNodeModulesTestRuntime",
|
||||
":kotlinNodeJsTestRuntimeExtract",
|
||||
|
||||
":clientTestNodeModules",
|
||||
":clientTest",
|
||||
|
||||
":serverKotlinJsNodeModules",
|
||||
":serverKotlinJsNodeModulesTestRuntime",
|
||||
":serverTestNodeModules",
|
||||
":serverTest"
|
||||
)
|
||||
|
||||
@@ -339,12 +339,12 @@ class MultiplatformGradleIT : BaseGradleIT() {
|
||||
assertSuccessful()
|
||||
|
||||
assertTasksUpToDate(
|
||||
":clientKotlinJsNodeModules",
|
||||
":clientKotlinJsNodeModulesTestRuntime",
|
||||
":kotlinNodeJsTestRuntimeExtract",
|
||||
|
||||
":clientTestNodeModules",
|
||||
":clientTest",
|
||||
|
||||
":serverKotlinJsNodeModules",
|
||||
":serverKotlinJsNodeModulesTestRuntime",
|
||||
":serverTestNodeModules",
|
||||
":serverTest"
|
||||
)
|
||||
}
|
||||
@@ -356,15 +356,14 @@ class MultiplatformGradleIT : BaseGradleIT() {
|
||||
assertSuccessful()
|
||||
|
||||
assertTasksUpToDate(
|
||||
":clientKotlinJsNodeModulesTestRuntime",
|
||||
":serverKotlinJsNodeModulesTestRuntime"
|
||||
":kotlinNodeJsTestRuntimeExtract"
|
||||
)
|
||||
|
||||
assertTasksExecuted(
|
||||
":clientKotlinJsNodeModules",
|
||||
":clientTestNodeModules",
|
||||
":clientTest",
|
||||
|
||||
":serverKotlinJsNodeModules",
|
||||
":serverTestNodeModules",
|
||||
":serverTest"
|
||||
)
|
||||
|
||||
|
||||
+16
-8
@@ -1,15 +1,23 @@
|
||||
package com.example
|
||||
|
||||
import kotlinx.html.dom.create
|
||||
import kotlinx.html.js.div
|
||||
import kotlinx.html.p
|
||||
import kotlin.browser.document
|
||||
import kotlinx.html.a
|
||||
import kotlinx.html.body
|
||||
import kotlinx.html.div
|
||||
import kotlinx.html.html
|
||||
import kotlinx.html.stream.appendHTML
|
||||
|
||||
fun hello() = "hello"
|
||||
|
||||
fun main() {
|
||||
document.create.div {
|
||||
p { hello() }
|
||||
}
|
||||
console.log(hello())
|
||||
println(
|
||||
StringBuilder().appendHTML().html {
|
||||
body {
|
||||
div {
|
||||
a("https://kotlinlang.org") {
|
||||
hello()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<results>
|
||||
<testsuite name="MainTest" tests="1" skipped="0" failures="0" errors="0" timestamp="..." hostname="..." time="...">
|
||||
<properties />
|
||||
<testcase name="testHello" classname="MainTest" time="..." />
|
||||
<system-out />
|
||||
<system-err />
|
||||
</testsuite>
|
||||
</results>
|
||||
|
||||
Reference in New Issue
Block a user