Skip to content

Commit 7e7c78e

Browse files
committed
adjusting try-catch blocks in jsTest
1 parent 9f614c7 commit 7e7c78e

File tree

4 files changed

+7
-7
lines changed
  • firebase-app/src/jsTest/kotlin/dev/gitlive/firebase
  • firebase-auth/src/jsTest/kotlin/dev/gitlive/firebase/auth
  • firebase-config/src/jsTest/kotlin/dev/gitlive/firebase/remoteconfig
  • firebase-firestore/src/jsTest/kotlin/dev/gitlive/firebase/firestore

4 files changed

+7
-7
lines changed

firebase-app/src/jsTest/kotlin/dev/gitlive/firebase/firebase.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ actual fun runTest(test: suspend () -> Unit) = GlobalScope
1414
try {
1515
test()
1616
} catch (e: dynamic) {
17-
e.log()
17+
(e as? Throwable)?.log()
1818
throw e
1919
}
2020
}.asDynamic()

firebase-auth/src/jsTest/kotlin/dev/gitlive/firebase/auth/auth.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ actual fun runTest(test: suspend () -> Unit) = GlobalScope
1515
.promise {
1616
try {
1717
test()
18-
} catch (e: Throwable) {
19-
e.log()
18+
} catch (e: dynamic) {
19+
(e as? Throwable)?.log()
2020
throw e
2121
}
2222
}.asDynamic()

firebase-config/src/jsTest/kotlin/dev/gitlive/firebase/remoteconfig/FirebaseRemoteConfig.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ actual fun runTest(test: suspend () -> Unit) = GlobalScope
99
.promise {
1010
try {
1111
test()
12-
} catch (e: Throwable) {
13-
e.log()
12+
} catch (e: dynamic) {
13+
(e as? Throwable)?.log()
1414
throw e
1515
}
1616
}.asDynamic()

firebase-firestore/src/jsTest/kotlin/dev/gitlive/firebase/firestore/firestore.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ actual fun runTest(test: suspend CoroutineScope.() -> Unit) = GlobalScope
1616
.promise {
1717
try {
1818
test()
19-
} catch (e: Throwable) {
20-
e.log()
19+
} catch (e: dynamic) {
20+
(e as? Throwable)?.log()
2121
throw e
2222
}
2323
}.asDynamic()

0 commit comments

Comments
 (0)