Fix deftests that have confusing args that only apply to defn

Follow up to #8412 where we're accidentally copying
invalid forms from other tests
pull/8448/head
Gabriel Horner 2023-01-30 10:56:06 -05:00
parent e7b511dc5b
commit 78506f22d0
5 changed files with 2 additions and 16 deletions

View File

@ -17,7 +17,6 @@
(-> (extract/extract file text {}) :pages first :block/properties :title))
(deftest extract-blocks-for-headings
[]
(is (= ["a" "b" "c"]
(extract
"- a
@ -45,7 +44,6 @@
- j"))))
(deftest parse-page-title
[]
(is (= nil
(extract-title "foo.org" "")))
(is (= "Howdy"
@ -67,7 +65,6 @@
)
(deftest extract-blocks-with-property-pages-config
[]
(are [extract-args expected-refs]
(= expected-refs
(->> (apply extract/extract extract-args)
@ -82,7 +79,6 @@
#{"bar" "bing"}))
(deftest test-regression-1902
[]
(is (= ["line1" "line2" "line3" "line4"]
(extract
"- line1
@ -103,7 +99,6 @@
:block/properties {:title "my whiteboard foo"}})})
(deftest test-extract-whiteboard-edn
[]
(let [{:keys [pages blocks]} (extract/extract-whiteboard-edn "/whiteboards/foo.edn" (pr-str foo-edn) {})
page (first pages)]
(is (= (get-in page [:block/file :file/path]) "/whiteboards/foo.edn"))

View File

@ -106,7 +106,6 @@
second))
(deftest org-properties-test
[]
(testing "just title"
(let [content "#+TITLE: some title "
props (parse-properties content)]

View File

@ -4,7 +4,6 @@
[logseq.graph-parser.mldoc :as gp-mldoc]))
(deftest test-get-page-name
[]
(are [x y] (= (text/get-page-name x) y)
"[[page]]" "page"
"[[another page]]" "another page"
@ -28,7 +27,6 @@
"[logseq/page](file:./pages/logseq.page.md)" "logseq/page"))
(deftest page-ref-un-brackets!
[]
(are [x y] (= (text/page-ref-un-brackets! x) y)
"[[page]]" "page"
"[[another page]]" "another page"
@ -41,7 +39,6 @@
:org "*"})
(deftest remove-level-spaces
[]
(testing "markdown"
(are [x y] (= (text/remove-level-spaces x :markdown (block-patterns :markdown) true) y)
"- foobar" "foobar"

View File

@ -3,7 +3,6 @@
[cljs.test :refer [are deftest]]))
(deftest page-ref?
[]
(are [x y] (= (page-ref/page-ref? x) y)
"[[page]]" true
"[[another page]]" true

View File

@ -3,7 +3,6 @@
[frontend.util.text :as text-util]))
(deftest test-add-timestamp
[]
(are [x y] (= x y)
(text-util/add-timestamp "LATER hello world\nhello"
"scheduled"
@ -21,7 +20,6 @@
"LATER hello world\nSCHEDULED: <2021-08-25 Wed>\nfoo:: bar\ntest"))
(deftest get-string-all-indexes
[]
(are [x y] (= x y)
(text-util/get-string-all-indexes "[[hello]] [[world]]" "[[" {})
[0 10]
@ -31,7 +29,7 @@
(text-util/get-string-all-indexes "a.c a.c ab" "a." {})
[0 4]
(text-util/get-string-all-indexes "abc" "" { :before? true })
[0]
@ -40,7 +38,6 @@
))
(deftest test-wrapped-by
[]
(are [x y] (= x y)
'(false false true false false)
(map #(text-util/wrapped-by? "[[]]" % "[[" "]]") (take 5 (range)))
@ -60,7 +57,6 @@
(deftest test-cut-by
[]
(are [x y] (= x y)
["" "" ""]
(text-util/cut-by "[[]]" "[[" "]]")
@ -88,6 +84,6 @@
["" "content" ""]
(text-util/cut-by "$pfts>$content$pfts<$" "$pfts>$" "$pfts<$")
["" "content$p" nil]
(text-util/cut-by "$pfts>$content$p" "$pfts>$" "$pfts<$")))