Skip to content

Commit 4e92777

Browse files
philomatesniwinz
authored andcommitted
Test delayed maybe/maybe arg evaluation in cljs
1 parent 269d281 commit 4e92777

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Stable:
2121
- **Documentation:** http://funcool.github.io/cats/latest/
2222
- **API reference:** http://funcool.github.io/cats/latest/api/
2323

24-
## Tests
24+
### Tests
2525

2626
To run Clojure tests:
2727

test/cats/monad/maybe_spec.cljc

+4-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,10 @@
160160
(t/is (= 42 (maybe/maybe 42 n inc)))
161161
(t/is (= 43 (maybe/maybe 42 j inc)))
162162
(t/is (= 42 (maybe/maybe 42 n (throw (ex-info "shouldn't run" {})))))
163-
#?(:clj (t/is (thrown? java.lang.AssertionError 43 (maybe/maybe 42 :not-maybe-value inc))))))
163+
(t/is (thrown?
164+
#?(:clj java.lang.AssertionError
165+
:cljs js/Error)
166+
43 (maybe/maybe 42 :not-maybe-value inc)))))
164167

165168
(t/deftest seq-conversion-test
166169
(let [n (maybe/nothing)

0 commit comments

Comments
 (0)