diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 2aa54e8..f5ecdf9 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -tools = "0.14.6-kotlin-1.8.20" +tools = "0.14.7-kotlin-1.8.20" kotlin = "1.8.20" atomicfu = "0.20.0" binary-compatibility-validator = "0.13.0" @@ -20,7 +20,7 @@ xmlutil = "0.84.3" yamlkt = "0.12.0" jsBom = "1.0.0-pre.530" junit = "5.9.2" -compose = "1.3.0" +compose = "1.4.0" logback = "1.4.6" [libraries] diff --git a/src/main/kotlin/space/kscience/gradle/KScienceExtension.kt b/src/main/kotlin/space/kscience/gradle/KScienceExtension.kt index a0f1a1d..7a4b15e 100644 --- a/src/main/kotlin/space/kscience/gradle/KScienceExtension.kt +++ b/src/main/kotlin/space/kscience/gradle/KScienceExtension.kt @@ -426,9 +426,24 @@ public open class KScienceMppExtension(project: Project) : KScienceExtension(pro project.pluginManager.withPlugin("org.jetbrains.kotlin.multiplatform") { project.configure { wasm { - browser() + browser { + testTask { + useKarma { + this.webpackConfig.experiments.add("topLevelAwait") + useChromeHeadless() + useConfigDirectory(project.projectDir.resolve("karma.config.d").resolve("wasm")) + } + } + } block() } + sourceSets { + getByName("wasmTest") { + dependencies { + implementation(kotlin("test")) + } + } + } } } }