Browse Source

fix tests I forgot to update with :block/format fix

Gabriel Horner 2 years ago
parent
commit
b1b830c872

+ 5 - 2
deps/graph-parser/test/logseq/graph_parser/cli_test.cljs

@@ -167,13 +167,16 @@
                        datoms->entity-maps
                        (map #(assoc (or (not-empty (select-keys % [:block/content :block/name]))
                                         %)
-                                    :attributes (disj (set (keys %)) :block/file)))
+                                    :attributes (disj (set (keys %)) :block/file :block/format)))
                        set)
         db-ents (->> (d/datoms graph-db :eavt)
                      datoms->entity-maps
                      (map #(assoc (or (not-empty (select-keys % [:block/content :block/name]))
                                       %)
-                                  :attributes (cond-> (set (keys %))
+                                  :attributes (cond-> (disj (set (keys %))
+                                                            ;; Don't compare :block/format as db graphs
+                                                            ;; are purposely different
+                                                            :block/format)
                                                 (seq (:block/content %))
                                                 (set/difference #{:block/created-at :block/updated-at}))))
                      set)]

+ 2 - 2
src/test/frontend/handler/repo_conversion_test.cljs

@@ -49,7 +49,7 @@
                 (into {})))
         "Task marker counts")
 
-    (is (= {:markdown 3141 :org 460}
+    (is (= {:markdown 3552 :org 519}
            (docs-graph-helper/get-block-format-counts db))
         "Block format counts")
 
@@ -98,7 +98,7 @@
   ;; only increase over time as the docs graph rarely has deletions
   (testing "Counts"
     (is (= 211 (count files)) "Correct file count")
-    (is (= 38823 (count (d/datoms db :eavt))) "Correct datoms count")
+    (is (= 39293 (count (d/datoms db :eavt))) "Correct datoms count")
 
     (is (= 3600
            (ffirst