소스 검색

fix: tests

Tienson Qin 4 달 전
부모
커밋
9bede53a34
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 2
      deps/graph-parser/test/logseq/graph_parser/exporter_test.cljs
  2. 1 1
      src/test/frontend/worker/handler/page/db_based/page_test.cljs

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

@@ -763,9 +763,9 @@
                 set))
         "All classes are correctly defined by :type")
 
-    (is (= "CreativeWork" (get-in (d/entity @conn :user.class/Movie) [:logseq.property.class/extends :block/title]))
+    (is (= ["CreativeWork"] (map :block/title (:logseq.property.class/extends (d/entity @conn :user.class/Movie))))
         "Existing page correctly set as class parent")
-    (is (= "Thing" (get-in (d/entity @conn :user.class/CreativeWork) [:logseq.property.class/extends :block/title]))
+    (is (= ["Thing"] (map :block/title (:logseq.property.class/extends (d/entity @conn :user.class/CreativeWork))))
         "New page correctly set as class parent")))
 
 (deftest-async export-files-with-property-pages-disabled

+ 1 - 1
src/test/frontend/worker/handler/page/db_based/page_test.cljs

@@ -45,7 +45,7 @@
         (is (= (map :block/uuid (db-db/get-page-parents child-page))
                (map :block/uuid (db-db/get-page-parents child-page2)))
             "Child page with existing parents has correct parents")
-        (is (= ["Root Tag" "c1"] (map :block/title (ldb/get-classes-parents [child-page3])))
+        (is (= #{"Root Tag" "c1"} (set (map :block/title (ldb/get-classes-parents [child-page3]))))
             "Child class with new parent has correct parents")
 
         (worker-db-page/create! conn "foo/class1/baz3" {:split-namespace? true})