Skip to content

Commit

Permalink
Run test in wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
mori-atsushi committed May 21, 2023
1 parent b67665b commit ee1aada
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 0 deletions.
24 changes: 24 additions & 0 deletions integration-test/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension

plugins {
kotlin("multiplatform")
alias(libs.plugins.ksp)
Expand All @@ -10,6 +12,15 @@ kotlin {
nodejs()
browser()
}
wasm {
binaries.executable()
nodejs()
browser {
commonWebpackConfig {
experiments = mutableSetOf("topLevelAwait")
}
}
}
ios()
iosSimulatorArm64()
macosX64()
Expand Down Expand Up @@ -154,6 +165,14 @@ kotlin {
val linuxArm64Test by getting {
dependsOn(nativeTest)
}

val wasmMain by getting {
dependsOn(nativeMain)
}

val wasmTest by getting {
dependsOn(nativeTest)
}
}
}

Expand All @@ -179,3 +198,8 @@ dependencies {
ksp {
arg("measureDuration", "true")
}

rootProject.the<NodeJsRootExtension>().apply {
nodeVersion = "20.2.0"
versions.webpack.version = "5.76.2"
}
16 changes: 16 additions & 0 deletions integration-test/lib1/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension

plugins {
kotlin("multiplatform")
alias(libs.plugins.ksp)
Expand All @@ -12,6 +14,15 @@ kotlin {
nodejs()
browser()
}
wasm {
binaries.executable()
nodejs()
browser {
commonWebpackConfig {
experiments = mutableSetOf("topLevelAwait")
}
}
}
ios()
iosSimulatorArm64()
macosX64()
Expand Down Expand Up @@ -79,3 +90,8 @@ ksp {
arg("measureDuration", "true")
arg("moduleName", "integration-test-lib1")
}

rootProject.the<NodeJsRootExtension>().apply {
nodeVersion = "20.2.0"
versions.webpack.version = "5.76.2"
}
16 changes: 16 additions & 0 deletions integration-test/lib2/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension

plugins {
kotlin("multiplatform")
alias(libs.plugins.ksp)
Expand All @@ -12,6 +14,15 @@ kotlin {
nodejs()
browser()
}
wasm {
binaries.executable()
nodejs()
browser {
commonWebpackConfig {
experiments = mutableSetOf("topLevelAwait")
}
}
}
ios()
iosSimulatorArm64()
macosX64()
Expand Down Expand Up @@ -78,3 +89,8 @@ ksp {
arg("measureDuration", "true")
arg("moduleName", "integration-test-lib2")
}

rootProject.the<NodeJsRootExtension>().apply {
nodeVersion = "20.2.0"
versions.webpack.version = "5.76.2"
}
16 changes: 16 additions & 0 deletions integration-test/lib3/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension

plugins {
kotlin("multiplatform")
alias(libs.plugins.ksp)
Expand All @@ -12,6 +14,15 @@ kotlin {
nodejs()
browser()
}
wasm {
binaries.executable()
nodejs()
browser {
commonWebpackConfig {
experiments = mutableSetOf("topLevelAwait")
}
}
}
ios()
iosSimulatorArm64()
macosX64()
Expand Down Expand Up @@ -77,3 +88,8 @@ ksp {
arg("measureDuration", "true")
arg("moduleName", "integration-test-lib3")
}

rootProject.the<NodeJsRootExtension>().apply {
nodeVersion = "20.2.0"
versions.webpack.version = "5.76.2"
}

0 comments on commit ee1aada

Please sign in to comment.