[Gradle, JS] Add configuration cache test for Karma test task

This commit is contained in:
Alexander Likhachev
2021-11-19 17:57:22 +03:00
parent e8b9ff6c59
commit 70c5fc703a
2 changed files with 24 additions and 0 deletions
@@ -6,6 +6,7 @@ dependencies {
implementation(kotlin("stdlib-js"))
implementation(project(":lib"))
implementation(npm(projectDir.resolve("src/main/css")))
testImplementation(kotlin("test-js"))
}
kotlin {
@@ -14,6 +15,13 @@ kotlin {
webpackTask {
cssSupport.enabled = true
}
testTask {
useKarma {
useChromeHeadless()
}
enabled = false // Task is disabled because it requires browser to be installed. That may be a problem on CI.
// Disabled but configured task allows us to check at least a part of configuration cache correctness.
}
}
binaries.executable()
@@ -0,0 +1,16 @@
/*
* Copyright 2010-2021 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.assertEquals
class AppTests {
@Test
fun testSheldon() {
assertEquals(73, sheldon())
}
}