[Gradle, JS] Add configuration cache test for Karma test task
This commit is contained in:
+8
@@ -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()
|
||||
|
||||
|
||||
+16
@@ -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())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user