[Gradle, JS] Add test on success installation of duplicated dependencies
This commit is contained in:
+10
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+31
@@ -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()
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "npm-dependencies-clash"
|
||||
+10
@@ -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")
|
||||
}
|
||||
+16
@@ -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 }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user