diff --git a/test/reagenttest/testcursor.cljs b/test/reagenttest/testcursor.cljs index adecddd..71ee9ae 100644 --- a/test/reagenttest/testcursor.cljs +++ b/test/reagenttest/testcursor.cljs @@ -469,5 +469,10 @@ (is (= @spy false)) (dispose r))) +(def assert-enabled? (try (assert false) + false + (catch :default _ true))) + (deftest cursor-assert-test - (is (thrown-with-msg? :default #"src must be a reactive atom or a function, not nil while attempting to get path: \[:foo :bar\]" (r/cursor nil [:foo :bar])))) + (when assert-enabled? + (is (thrown-with-msg? :default #"src must be a reactive atom or a function, not nil while attempting to get path: \[:foo :bar\]" (r/cursor nil [:foo :bar])))))