[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(
|
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) {
|
class CustomLauncher(var base: String) {
|
||||||
|
|||||||
+10
-6
@@ -56,9 +56,6 @@ class KotlinKarma(override val compilation: KotlinJsCompilation) : KotlinJsTestF
|
|||||||
useMocha()
|
useMocha()
|
||||||
useWebpack()
|
useWebpack()
|
||||||
useSourceMapSupport()
|
useSourceMapSupport()
|
||||||
|
|
||||||
config.singleRun = true
|
|
||||||
config.autoWatch = false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun useKotlinReporter() {
|
private fun useKotlinReporter() {
|
||||||
@@ -309,9 +306,16 @@ class KotlinKarma(override val compilation: KotlinJsCompilation) : KotlinJsTestF
|
|||||||
|
|
||||||
val nodeModules = listOf("karma/bin/karma")
|
val nodeModules = listOf("karma/bin/karma")
|
||||||
|
|
||||||
val args = nodeJsArgs +
|
val args = if (debug) {
|
||||||
nodeModules.map { npmProject.require(it) } +
|
config.client.mocha.timeout = "0"
|
||||||
listOf("start", karmaConfJs.absolutePath)
|
|
||||||
|
//TODO need generate it
|
||||||
|
listOf("./debugRunner.js")
|
||||||
|
} else {
|
||||||
|
nodeJsArgs +
|
||||||
|
nodeModules.map { npmProject.require(it) } +
|
||||||
|
listOf("start", karmaConfJs.absolutePath)
|
||||||
|
}
|
||||||
|
|
||||||
return object : JSServiceMessagesTestExecutionSpec(
|
return object : JSServiceMessagesTestExecutionSpec(
|
||||||
forkOptions,
|
forkOptions,
|
||||||
|
|||||||
Reference in New Issue
Block a user