[Gradle, JS] Persist yarn lock by default

^KT-34014 fixed
^KT-49505 fixed
This commit is contained in:
Ilya Goncharov
2021-10-26 17:40:47 +03:00
committed by Space
parent b11f2fb2af
commit a03f346296
3 changed files with 69 additions and 5 deletions
@@ -22,6 +22,7 @@ import org.jetbrains.kotlin.gradle.tasks.USING_JS_IR_BACKEND_MESSAGE
import org.jetbrains.kotlin.gradle.testbase.*
import org.jetbrains.kotlin.gradle.util.jsCompilerType
import org.jetbrains.kotlin.gradle.util.normalizePath
import org.junit.Test
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.DisplayName
import org.junit.jupiter.api.condition.DisabledIf
@@ -1040,4 +1041,15 @@ class GeneralKotlin2JsGradlePluginIT : KGPBaseTest() {
build("checkIfLastModifiedNotNow", "--rerun-tasks")
}
}
@DisplayName("Yarn.lock persistence")
@GradleTest
fun testYarnLockStore() = with(transformProjectWithPluginsDsl("cleanTask")) {
build("assemble") {
assertSuccessful()
assertFileExists("kotlin-yarn.lock")
assert(fileInWorkingDir("kotlin-yarn.lock").readText() == fileInWorkingDir("build/js/yarn.lock").readText())
}
}
}