[Gradle, JS] Fix configuration cache problem in Mocha test task

#KT-49808 Fixed
This commit is contained in:
Alexander Likhachev
2021-11-19 17:26:03 +03:00
parent 439f69a20d
commit e8b9ff6c59
@@ -53,6 +53,8 @@ class KotlinMocha(@Transient override val compilation: KotlinJsCompilation, priv
// https://mochajs.org/#-timeout-ms-t-ms
var timeout: String = DEFAULT_TIMEOUT
private val platformType = compilation.platformType
override fun createTestExecutionSpec(
task: KotlinJsTest,
forkOptions: ProcessForkOptions,
@@ -95,7 +97,7 @@ class KotlinMocha(@Transient override val compilation: KotlinJsCompilation, priv
} else {
addAll(cliArg(TIMEOUT_ARG, timeout))
}
if (compilation.platformType == KotlinPlatformType.wasm) {
if (platformType == KotlinPlatformType.wasm) {
addAll(cliArg("-n", "experimental-wasm-typed-funcref,experimental-wasm-gc,experimental-wasm-eh"))
}
}