[Gradle, JS] Add test on success installation of duplicated dependencies

This commit is contained in:
Ilya Goncharov
2019-10-18 22:36:54 +03:00
parent bdd6186a07
commit e17b9097df
5 changed files with 75 additions and 0 deletions
@@ -444,4 +444,14 @@ class Kotlin2JsGradlePluginIT : BaseGradleIT() {
)
}
}
@Test
fun testNpmDependenciesClash() = with(Project("npm-dependencies-clash", GradleVersionRequired.AtLeast("4.10.2"))) {
setupWorkingDir()
gradleBuildScript().modify(::transformBuildScriptWithPluginsDsl)
build("test") {
assertSuccessful()
}
}
}
@@ -0,0 +1,31 @@
plugins {
kotlin("js") version "<pluginMarkerVersion>"
}
group = "com.example"
version = "1.0"
repositories {
mavenLocal()
jcenter()
}
kotlin.sourceSets {
getByName("main") {
dependencies {
implementation(kotlin("stdlib-js"))
}
}
getByName("test") {
dependencies {
implementation(kotlin("test-js"))
implementation(npm("mocha"))
implementation(npm("puppeteer"))
}
}
}
kotlin.target {
nodejs()
}
@@ -0,0 +1,8 @@
pluginManagement {
repositories {
mavenLocal()
gradlePluginPortal()
}
}
rootProject.name = "npm-dependencies-clash"
@@ -0,0 +1,10 @@
/*
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package com.example
fun main() {
println("Hello, Yarn")
}
@@ -0,0 +1,16 @@
/*
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package com.example
import kotlin.test.Test
import kotlin.test.assertTrue
class SimpleTest {
@Test
fun simpleTest() {
assertTrue { true }
}
}