[Gradle, JS] Add test on dom-api-compat

This commit is contained in:
Ilya Goncharov
2023-01-24 19:03:36 +01:00
committed by Space Team
parent 67346f7913
commit d1768029b4
3 changed files with 41 additions and 0 deletions
@@ -401,6 +401,17 @@ class Kotlin2JsIrGradlePluginIT : AbstractKotlin2JsGradlePluginIT(true) {
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
@@ -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")
}
}
}
}
@@ -0,0 +1,5 @@
import kotlinx.coroutines.Dispatchers
fun main() {
Dispatchers.Main
}