fix: Insufficient bindings error after datascript upgrade

After upgrading our forked datascript from 1.5.3 to 1.7.1,
bindings in two of our rules behaved differently. The workaround
of adding an `and` where none was required before is sufficient.
Fixes LOG-3177
This commit is contained in:
Gabriel Horner
2024-06-27 16:11:29 -04:00
parent 6b0b9c5e18
commit e58f1221d2
4 changed files with 20 additions and 9 deletions

View File

@@ -286,8 +286,16 @@ prop-d:: [[nada]]"}])
"Multiple boolean operators with todo and priority operators")
(is (= ["DOING b4" "DOING b5"]
(map testable-content
(dsl-query "(and (task doing) (or [[A]] [[B]]))")))))
(map testable-content
(dsl-query "(and (task doing) (or [[A]] [[B]]))")))))
(when js/process.env.DB_GRAPH
;; Ensure some filters work when no data with relevant properties exist
(deftest queries-with-no-data
(load-test-files [])
(is (= [] (dsl-query "(task todo)")))
(is (= [] (dsl-query "(priority high)")))))
(deftest sample-queries
(load-test-files [{:file/path "pages/page1.md"