fix: editor async tests

This commit is contained in:
Tienson Qin
2024-07-23 12:09:15 +08:00
parent 3ecc52cac6
commit d2b798ece5
2 changed files with 9 additions and 3 deletions

View File

@@ -68,7 +68,10 @@
(delete-block @conn block
{:on-delete (fn []
(let [updated-blocks (->> (d/q '[:find (pull ?b [*])
:where [?b :block/title] [(missing? $ ?b :block/pre-block?)]]
:where
[?b :block/parent]
[?b :block/title]
[(missing? $ ?b :block/pre-block?)]]
@conn)
(map (comp :block/title first)))]
(is (= ["b1" "b2"] updated-blocks) "Block is deleted")))})))
@@ -92,7 +95,10 @@
{:embed? true
:on-delete (fn []
(let [updated-blocks (->> (d/q '[:find (pull ?b [*])
:where [?b :block/title] [(missing? $ ?b :block/pre-block?)]]
:where
[?b :block/parent]
[?b :block/title]
[(missing? $ ?b :block/pre-block?)]]
@conn)
(map (comp :block/title first)))]
(is (= ["b1" "b2"] updated-blocks) "Block is deleted")))}))))