[Gradle, JS] Add test on dom-api-compat
This commit is contained in:
committed by
Space Team
parent
67346f7913
commit
d1768029b4
+11
@@ -401,6 +401,17 @@ class Kotlin2JsIrGradlePluginIT : AbstractKotlin2JsGradlePluginIT(true) {
|
|||||||
buildAndFail("assemble")
|
buildAndFail("assemble")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@DisplayName("JS IR compiled against automatically added dom-api-compat")
|
||||||
|
@GradleTest
|
||||||
|
fun testJsIrCompiledAgainstAutomaticallyAddedDomApiCompat(gradleVersion: GradleVersion) {
|
||||||
|
project("kotlin-js-coroutines", gradleVersion) {
|
||||||
|
buildGradleKts.modify(::transformBuildScriptWithPluginsDsl)
|
||||||
|
|
||||||
|
build("assemble")
|
||||||
|
build("compileDevelopmentExecutableKotlinJs")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsGradlePluginTests
|
@JsGradlePluginTests
|
||||||
|
|||||||
+25
@@ -0,0 +1,25 @@
|
|||||||
|
import org.jetbrains.kotlin.gradle.plugin.KotlinJsCompilerType.BOTH as BOTH_TYPE
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
kotlin("multiplatform")
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
mavenLocal()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
js {
|
||||||
|
binaries.executable()
|
||||||
|
nodejs()
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
val jsMain by getting {
|
||||||
|
dependencies {
|
||||||
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
import kotlinx.coroutines.Dispatchers
|
||||||
|
|
||||||
|
fun main() {
|
||||||
|
Dispatchers.Main
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user