Skip to content

Commit 14d8321

Browse files
committed
Add test case for do with catch
1 parent 5c99265 commit 14d8321

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/promesa/tests/core_test.cljc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -904,3 +904,14 @@
904904
(p/fnly (fn [r]
905905
(t/is (= r 2))
906906
(done))))))))
907+
908+
#?(:cljs
909+
(t/deftest do-expr-with-catch
910+
(t/async done
911+
(->> (p/do (throw (ex-info "test" {})))
912+
(p/merr (fn [cause]
913+
(p/do "ok")))
914+
(p/fnly (fn [result cause]
915+
(t/is (nil? cause))
916+
(t/is (= "ok" result))
917+
(done)))))))

0 commit comments

Comments
 (0)