Skip to content

Commit

Permalink
Test that invalid queries involving or throw an exception instead o…
Browse files Browse the repository at this point in the history
…f evaluating to `nil`
  • Loading branch information
devurandom committed May 20, 2019
1 parent da2fb70 commit 76c6adc
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/datascript/test/query_or.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,12 @@
(d/q '[:find ?e
:where (or-join [[?e]]
[?e :name "Ivan"])]
@test-db))))
@test-db)))

(is (thrown-msg? "???"
(d/q '[:find ?e
:where
[?top :name "Ivan"]
[?top :age 10]
[(or ?e ?top)]]
@test-db))))

0 comments on commit 76c6adc

Please sign in to comment.