Remove parse catch for consistent error handling

For advanced queries we error when invalid queries are written. We
should do the same for simple query.
Also add a test for tag query format
This commit is contained in:
Gabriel Horner
2022-03-15 16:09:12 -04:00
committed by Tienson Qin
parent e615423e6a
commit a41dd0abfc
2 changed files with 30 additions and 30 deletions

View File

@@ -365,7 +365,12 @@ tags: other
(testing "page-ref queries"
(is (= ["b2 [[page 2]] #tag1"]
(map :block/content (dsl-query "[[page 2]]"))))
(map :block/content (dsl-query "[[page 2]]")))
"Page ref arg")
(is (= ["b2 [[page 2]] #tag1"]
(map :block/content (dsl-query "#tag1")))
"Tag arg")
(is (= []
(map :block/content (dsl-query "[[blarg]]")))