[Gradle, JS] Fix timeout for debug

#KT-37035 fixed
This commit is contained in:
Ilya Goncharov
2020-02-25 19:37:33 +03:00
parent 870b7d234f
commit 7719dfca4a
@@ -90,7 +90,11 @@ class KotlinMocha(override val compilation: KotlinJsCompilation) :
add(adapter.canonicalPath) add(adapter.canonicalPath)
addAll(cliArgs.toList()) addAll(cliArgs.toList())
addAll(cliArg("--reporter", "kotlin-test-js-runner/mocha-kotlin-reporter.js")) addAll(cliArg("--reporter", "kotlin-test-js-runner/mocha-kotlin-reporter.js"))
addAll(cliArg("--timeout", timeout)) if (debug) {
add(NO_TIMEOUT_ARG)
} else {
addAll(cliArg(TIMEOUT_ARG, timeout))
}
} }
return TCServiceMessagesTestExecutionSpec( return TCServiceMessagesTestExecutionSpec(
@@ -136,3 +140,6 @@ class KotlinMocha(override val compilation: KotlinJsCompilation) :
private const val DEFAULT_TIMEOUT = "2s" private const val DEFAULT_TIMEOUT = "2s"
} }
} }
private const val TIMEOUT_ARG = "--timeout"
private const val NO_TIMEOUT_ARG = "--no-timeout"