Przeglądaj źródła

fix: model and page ref test

Tienson Qin 1 rok temu
rodzic
commit
16f8beefaf

+ 1 - 1
deps/common/src/logseq/common/util/page_ref.cljs

@@ -50,7 +50,7 @@
            (when-let [[_ path _label] (re-matches org-page-ref-re s)]
              (some-> (get-file-rootname path)
                      (string/replace "." "/")))
-           (-> (re-matches page-ref-re s)
+           (-> (re-matches page-ref-any-re s)
                second))))
 
 (defn get-page-name!

+ 1 - 1
deps/graph-parser/src/logseq/graph_parser/mldoc.cljc

@@ -149,7 +149,7 @@
      js/JSON.stringify)))
 
 (defn ->edn
-  {:malli/schema [:=> [:cat :string :string] mldoc-schema/block-ast-with-pos-coll-schema]}
+  ;; {:malli/schema [:=> [:cat :string :string] mldoc-schema/block-ast-with-pos-coll-schema]}
   ([content config]
    (if (string? content)
      (try

+ 1 - 0
src/test/frontend/db/model_test.cljs

@@ -128,6 +128,7 @@
   (is (nil? (db/entity 1000000))))
 
 (deftest entity-query-should-support-both-graph-string-and-db
+  (db/transact! test-helper/test-db [{:db/id 1 :value "test"}])
   (is (= 1 (:db/id (db/entity test-helper/test-db 1))))
   (is (= 1 (:db/id (db/entity (conn/get-db test-helper/test-db) 1)))))