[Debugger, JS] Use default js debug configuration with Karma
This commit is contained in:
+6
-1
@@ -22,7 +22,12 @@ data class KarmaConfig(
|
||||
)
|
||||
|
||||
data class KarmaClient(
|
||||
val args: MutableList<String> = mutableListOf()
|
||||
val args: MutableList<String> = mutableListOf(),
|
||||
val mocha: KarmaMocha = KarmaMocha()
|
||||
)
|
||||
|
||||
data class KarmaMocha(
|
||||
var timeout: String = "2s"
|
||||
)
|
||||
|
||||
class CustomLauncher(var base: String) {
|
||||
|
||||
+10
-6
@@ -56,9 +56,6 @@ class KotlinKarma(override val compilation: KotlinJsCompilation) : KotlinJsTestF
|
||||
useMocha()
|
||||
useWebpack()
|
||||
useSourceMapSupport()
|
||||
|
||||
config.singleRun = true
|
||||
config.autoWatch = false
|
||||
}
|
||||
|
||||
private fun useKotlinReporter() {
|
||||
@@ -309,9 +306,16 @@ class KotlinKarma(override val compilation: KotlinJsCompilation) : KotlinJsTestF
|
||||
|
||||
val nodeModules = listOf("karma/bin/karma")
|
||||
|
||||
val args = nodeJsArgs +
|
||||
nodeModules.map { npmProject.require(it) } +
|
||||
listOf("start", karmaConfJs.absolutePath)
|
||||
val args = if (debug) {
|
||||
config.client.mocha.timeout = "0"
|
||||
|
||||
//TODO need generate it
|
||||
listOf("./debugRunner.js")
|
||||
} else {
|
||||
nodeJsArgs +
|
||||
nodeModules.map { npmProject.require(it) } +
|
||||
listOf("start", karmaConfJs.absolutePath)
|
||||
}
|
||||
|
||||
return object : JSServiceMessagesTestExecutionSpec(
|
||||
forkOptions,
|
||||
|
||||
Reference in New Issue
Block a user