Skip to content

Commit

Permalink
Disable mocha timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
osipxd committed Dec 13, 2024
1 parent e77cf49 commit 9e4c242
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
17 changes: 8 additions & 9 deletions buildSrc/src/main/kotlin/JsConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
* Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/

import internal.*
import org.gradle.api.*
import org.gradle.internal.extensions.stdlib.*
import org.gradle.kotlin.dsl.*
import org.jetbrains.kotlin.gradle.targets.js.dsl.*
import java.io.*
import kotlin.toString
import internal.capitalized
import internal.libs
import org.gradle.api.Project
import org.gradle.kotlin.dsl.invoke
import org.jetbrains.kotlin.gradle.targets.js.dsl.KotlinJsSubTargetDsl

fun Project.configureJs() {
kotlin {
Expand All @@ -34,7 +32,8 @@ fun Project.configureJs() {
internal fun KotlinJsSubTargetDsl.useMochaForTests() {
testTask {
useMocha {
timeout = "10000"
// Disable timeout as we use individual timeouts for tests
timeout = "0"
}
}
}
Expand All @@ -43,7 +42,7 @@ internal fun KotlinJsSubTargetDsl.useKarmaForTests() {
testTask {
useKarma {
useChromeHeadless()
useConfigDirectory(File(project.rootProject.projectDir, "karma"))
useConfigDirectory(project.rootProject.file("karma"))
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion karma/chrome_bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ config.set({
"client": {
captureConsole: true,
"mocha": {
timeout: 10000
// Disable timeout as we use individual timeouts for tests
timeout: 0
}
}
});
Expand Down

0 comments on commit 9e4c242

Please sign in to comment.