fixed tests for cljs

This commit is contained in:
tommy-mor 2024-09-16 10:28:40 -04:00
parent 7a2fe14aa1
commit eaadcb2762

View file

@ -1440,10 +1440,14 @@
(is (= "abq" (setval s/LAST "q" "abc")))
)
(defn whitespace? [char]
(re-matches #"\s" (str char)))
(deftest string-transform-test
(is (= "123" (transform s/ALL identity "123")))
(is (= "123" (setval [s/ALL #(Character/isWhitespace %)] s/NONE "1 2 3")))
(is (= "123" (transform [(s/filterer #(Character/isWhitespace %))] s/NONE "1 2 3"))))
(is (= "123" (transform [s/ALL whitespace?] s/NONE "1 2 3")))
#?(:clj (is (= "123" (setval [s/ALL #(Character/isWhitespace %)] s/NONE "1 2 3"))))
#?(:clj (is (= "123" (transform [(s/filterer #(Character/isWhitespace %))] s/NONE "1 2 3")))))
(deftest regex-navigation-test
;; also test regexes as implicit navs