mirror of https://github.com/status-im/reagent.git
Test cursor assertion only if assertions are enabled
This commit is contained in:
parent
afd4d89808
commit
40e1ca306b
|
@ -469,5 +469,10 @@
|
||||||
(is (= @spy false))
|
(is (= @spy false))
|
||||||
(dispose r)))
|
(dispose r)))
|
||||||
|
|
||||||
|
(def assert-enabled? (try (assert false)
|
||||||
|
false
|
||||||
|
(catch :default _ true)))
|
||||||
|
|
||||||
(deftest cursor-assert-test
|
(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])))))
|
||||||
|
|
Loading…
Reference in New Issue