[Wasm] Remove redundant code

This commit is contained in:
Igor Yakovlev
2023-05-15 19:24:28 +02:00
committed by Space Team
parent 6adfd91169
commit ed1c15b64b
@@ -48,13 +48,12 @@ internal class JasmineLikeAdapter : FrameworkAdapter {
(testFn() as? Promise<*>)?.catch { exception -> (testFn() as? Promise<*>)?.catch { exception ->
val jsException = exception val jsException = exception
.toThrowableOrNull() .toThrowableOrNull()
?.let { it.toJsError() } ?.toJsError()
?: exception ?: exception
Promise.reject(jsException) Promise.reject(jsException)
} }
} catch (exception: Throwable) { } catch (exception: Throwable) {
jsThrow(exception.toJsError()) jsThrow(exception.toJsError())
null
} }
override fun test(name: String, ignored: Boolean, testFn: () -> Any?) { override fun test(name: String, ignored: Boolean, testFn: () -> Any?) {