Gradle, JS Test: temporary disable js tests configuration

Test configuration will be reworked with new DSL for browser and nodejs
configuration.
This commit is contained in:
Sergey Rostov
2019-05-05 22:32:23 +03:00
parent 5698d923eb
commit 956f27cc2d
3 changed files with 0 additions and 94 deletions
@@ -398,8 +398,6 @@ class Kotlin2JsGradlePluginIT : BaseGradleIT() {
"build/test_node_modules/kotlin-js-plugin_test.js.map",
"\"sources\":[\"..$slash..${slash}src${slash}test${slash}kotlin${slash}MainTest.kt\"]"
)
assertTestResults("testProject/kotlin-js-plugin-project/tests.xml", "test")
}
}
}
@@ -299,88 +299,4 @@ class MultiplatformGradleIT : BaseGradleIT() {
assertTasksExecuted(customSourceSetCompileTasks)
}
}
@Test
fun testMppNodeJsTestRun() = with(Project("new-mpp-js-tests", GradleVersionRequired.AtLeast("5.0"))) {
setupWorkingDir()
gradleBuildScript().modify(::transformBuildScriptWithPluginsDsl)
gradleSettingsScript().modify(::transformBuildScriptWithPluginsDsl)
// just build without running tests to check configuration avoidance
build("assemble") {
assertSuccessful()
assertTasksRegisteredAndNotRealized(
":clientTestNodeModules",
":clientTest",
":serverTestNodeModules",
":serverTest"
)
}
build("check") {
assertSuccessful()
assertTasksExecuted(
":clientTestNodeModules",
":clientTest",
":serverTestNodeModules",
":serverTest"
)
assertFileExists("build/client_test_node_modules/kotlin.js")
assertFileExists("build/client_test_node_modules/kotlin.js.map")
assertFileExists("build/client_test_node_modules/kotlin-test.js")
assertFileExists("build/client_test_node_modules/kotlin-test.js.map")
assertFileExists("build/client_test_node_modules/kotlin-test-nodejs-runner.js")
assertFileExists("build/client_test_node_modules/kotlin-test-nodejs-runner.js.map")
assertFileExists("build/client_test_node_modules/kotlin-nodejs-source-map-support.js")
assertFileExists("build/client_test_node_modules/kotlin-nodejs-source-map-support.js.map")
assertFileExists("build/client_test_node_modules/new-mpp-js-tests.js")
assertFileExists("build/client_test_node_modules/new-mpp-js-tests.js.map")
assertFileExists("build/client_test_node_modules/new-mpp-js-tests_test.js")
assertFileExists("build/client_test_node_modules/new-mpp-js-tests_test.js.map")
assertFileContains(
"build/client_test_node_modules/new-mpp-js-tests_test.js.map",
"\"sources\":[\"../../src/commonTest/kotlin/CommonTest.kt\"]"
)
assertTestResults("testProject/new-mpp-js-tests/TEST-CommonTest.xml", "clientTest")
assertTestResults("testProject/new-mpp-js-tests/TEST-CommonTest.xml", "serverTest")
}
// test all is up-to-date when no changes
build("check") {
assertSuccessful()
assertTasksUpToDate(
":clientTestNodeModules",
":clientTest",
":serverTestNodeModules",
":serverTest"
)
}
// change common file and check that all tasks executed
projectDir.resolve("src/commonMain/kotlin/common.kt").writeText("fun common() = 777")
build("check") {
assertSuccessful()
assertTasksExecuted(
":clientTestNodeModules",
":clientTest",
":serverTestNodeModules",
":serverTest"
)
assertTestResults("testProject/new-mpp-js-tests/TEST-CommonTest-2.xml", "clientTest")
assertTestResults("testProject/new-mpp-js-tests/TEST-CommonTest-2.xml", "serverTest")
}
}
}
@@ -30,14 +30,6 @@ class KotlinJsTargetConfigurator(kotlinPluginVersion: String) :
}
}
override fun configureTest(target: KotlinOnlyTarget<KotlinJsCompilation>) {
target.compilations.all {
if (isTestCompilation(it)) {
KotlinJsCompilationTestsConfigurator(it).configure()
}
}
}
companion object {
internal fun isTestCompilation(it: KotlinJsCompilation) =
it.name == KotlinCompilation.TEST_COMPILATION_NAME