[Gradle, JS] Add test on node js single platform project
^KT-40527 fixed
This commit is contained in:
+6
-1
@@ -217,8 +217,13 @@ public class YamlNewWizardProjectImportTestGenerated extends AbstractYamlNewWiza
|
||||
}
|
||||
|
||||
@TestMetadata("singlePlatformJsBrowser")
|
||||
public void testSingleplatformJs() throws Exception {
|
||||
public void testSingleplatformJsBrowser() throws Exception {
|
||||
runTest("libraries/tools/new-project-wizard/new-project-wizard-cli/testData/buildFileGeneration/singlePlatformJsBrowser/");
|
||||
}
|
||||
|
||||
@TestMetadata("singlePlatformJsNode")
|
||||
public void testSingleplatformJsNode() throws Exception {
|
||||
runTest("libraries/tools/new-project-wizard/new-project-wizard-cli/testData/buildFileGeneration/singlePlatformJsNode/");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
plugins {
|
||||
id 'org.jetbrains.kotlin.js' version 'KOTLIN_VERSION'
|
||||
}
|
||||
group = 'testGroupId'
|
||||
version = '1.0-SNAPSHOT'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
url 'https://dl.bintray.com/kotlin/kotlin-dev'
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
testImplementation 'org.jetbrains.kotlin:kotlin-test-js'
|
||||
}
|
||||
kotlin {
|
||||
js {
|
||||
nodejs {
|
||||
binaries.executable()
|
||||
}
|
||||
}
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
plugins {
|
||||
kotlin("js") version "KOTLIN_VERSION"
|
||||
}
|
||||
group = "testGroupId"
|
||||
version = "1.0-SNAPSHOT"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
url = uri("https://dl.bintray.com/kotlin/kotlin-dev")
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
testImplementation(kotlin("test-js"))
|
||||
}
|
||||
kotlin {
|
||||
js {
|
||||
nodejs {
|
||||
binaries.executable()
|
||||
}
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
maven {
|
||||
url 'https://dl.bintray.com/kotlin/kotlin-dev'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
rootProject.name = 'generatedProject'
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
maven {
|
||||
url = uri("https://dl.bintray.com/kotlin/kotlin-dev")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
rootProject.name = "generatedProject"
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
kotlin:
|
||||
projectKind: js
|
||||
modules:
|
||||
- type: jsNodeSinglePlatform
|
||||
name: a
|
||||
+6
-1
@@ -79,7 +79,12 @@ public class YamlBuildFileGenerationTestGenerated extends AbstractYamlBuildFileG
|
||||
}
|
||||
|
||||
@TestMetadata("singlePlatformJsBrowser")
|
||||
public void testSingleplatformJs() throws Exception {
|
||||
public void testSingleplatformJsBrowser() throws Exception {
|
||||
runTest("libraries/tools/new-project-wizard/new-project-wizard-cli/testData/buildFileGeneration/singlePlatformJsBrowser/");
|
||||
}
|
||||
|
||||
@TestMetadata("singlePlatformJsNode")
|
||||
public void testSingleplatformJsNode() throws Exception {
|
||||
runTest("libraries/tools/new-project-wizard/new-project-wizard-cli/testData/buildFileGeneration/singlePlatformJsNode/");
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -264,6 +264,7 @@ interface ModuleConfigurator : DisplayableSettingItem, EntitiesOwnerDescriptor {
|
||||
+AndroidSinglePlatformModuleConfigurator
|
||||
+IOSSinglePlatformModuleConfigurator
|
||||
+BrowserJsSinglePlatformModuleConfigurator
|
||||
+NodeJsSinglePlatformModuleConfigurator
|
||||
}
|
||||
|
||||
init {
|
||||
|
||||
+2
-1
@@ -67,7 +67,8 @@ class Module(
|
||||
configurator == MppModuleConfigurator -> KotlinNewProjectWizardBundle.message("module.kind.mpp.module")
|
||||
configurator == AndroidSinglePlatformModuleConfigurator -> KotlinNewProjectWizardBundle.message("module.kind.android.module")
|
||||
configurator == IOSSinglePlatformModuleConfigurator -> KotlinNewProjectWizardBundle.message("module.kind.ios.module")
|
||||
configurator == BrowserJsSinglePlatformModuleConfigurator -> KotlinNewProjectWizardBundle.message("module.kind.js.module")
|
||||
configurator == BrowserJsSinglePlatformModuleConfigurator ||
|
||||
configurator == NodeJsSinglePlatformModuleConfigurator -> KotlinNewProjectWizardBundle.message("module.kind.js.module")
|
||||
else -> KotlinNewProjectWizardBundle.message("module.kind.module")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user