From 4865e2539ddf2782e3f118e17a2dcfe88f743366 Mon Sep 17 00:00:00 2001 From: Luca Kellermann Date: Sat, 16 Mar 2024 15:15:24 +0100 Subject: [PATCH] Disable timeouts for Kotlin/JS tests (#926) Some tests added in #923 seem to time out on Kotlin/JS. To avoid problems like this in the future, this commit disables test timeouts on Kotlin/JS completely. --- .../main/kotlin/kord-multiplatform-module.gradle.kts | 10 +++++++++- core/build.gradle.kts | 10 ---------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/buildSrc/src/main/kotlin/kord-multiplatform-module.gradle.kts b/buildSrc/src/main/kotlin/kord-multiplatform-module.gradle.kts index f56faf4bc48..4b9a4dfe41a 100644 --- a/buildSrc/src/main/kotlin/kord-multiplatform-module.gradle.kts +++ b/buildSrc/src/main/kotlin/kord-multiplatform-module.gradle.kts @@ -27,7 +27,15 @@ kotlin { jvm() js { - nodejs() + nodejs { + testTask { + useMocha { + // disable timeouts, some tests are too slow for default 2-second timeout: + // https://mochajs.org/#-timeout-ms-t-ms + timeout = "0" + } + } + } useCommonJs() } jvmToolchain(Jvm.target) diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 454621f9578..dd2d439ba82 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -4,16 +4,6 @@ plugins { } kotlin { - js { - nodejs { - testTask { - useMocha { - timeout = "10000" // KordEventDropTest is too slow for default 2 seconds timeout - } - } - } - } - sourceSets { commonMain { dependencies {