Skip to content

Commit 76c6adc

Browse files
committed
Test that invalid queries involving or throw an exception instead of evaluating to nil
1 parent da2fb70 commit 76c6adc

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/datascript/test/query_or.cljc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,4 +157,12 @@
157157
(d/q '[:find ?e
158158
:where (or-join [[?e]]
159159
[?e :name "Ivan"])]
160-
@test-db))))
160+
@test-db)))
161+
162+
(is (thrown-msg? "???"
163+
(d/q '[:find ?e
164+
:where
165+
[?top :name "Ivan"]
166+
[?top :age 10]
167+
[(or ?e ?top)]]
168+
@test-db))))

0 commit comments

Comments
 (0)