From ed1c15b64b62dc506859e0ed64c42987c505d43f Mon Sep 17 00:00:00 2001 From: Igor Yakovlev Date: Mon, 15 May 2023 19:24:28 +0200 Subject: [PATCH] [Wasm] Remove redundant code --- .../wasm/src/main/kotlin/kotlin/test/JasmineLikeAdapter.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libraries/kotlin.test/wasm/src/main/kotlin/kotlin/test/JasmineLikeAdapter.kt b/libraries/kotlin.test/wasm/src/main/kotlin/kotlin/test/JasmineLikeAdapter.kt index 023e8926b42..e9a23c9d8a0 100644 --- a/libraries/kotlin.test/wasm/src/main/kotlin/kotlin/test/JasmineLikeAdapter.kt +++ b/libraries/kotlin.test/wasm/src/main/kotlin/kotlin/test/JasmineLikeAdapter.kt @@ -48,13 +48,12 @@ internal class JasmineLikeAdapter : FrameworkAdapter { (testFn() as? Promise<*>)?.catch { exception -> val jsException = exception .toThrowableOrNull() - ?.let { it.toJsError() } + ?.toJsError() ?: exception Promise.reject(jsException) } } catch (exception: Throwable) { jsThrow(exception.toJsError()) - null } override fun test(name: String, ignored: Boolean, testFn: () -> Any?) {