Liking cljdoc? Tell your friends :D

lucid.core.code.test.clojure


gather-deftestclj

(gather-deftest zloc)

Make docstring notation out of deftest form (-> "^{:refer example/hello-world :added "0.1"} (deftest hello-world-test\n "Sample test program"\n (is (= 1 1))\n (is (identical? 2 4)))" (z/of-string) z/down z/right z/down z/right z/right (gather-deftest) :test common/join-nodes) => ""Sample test program"\n 1\n => 1\n (identical? 2 4)\n => true"

Make docstring notation out of deftest form
 (-> "^{:refer example/hello-world :added \"0.1\"}
      (deftest hello-world-test\n  \"Sample test program\"\n  (is (= 1 1))\n  (is (identical? 2 4)))"
     (z/of-string)
     z/down z/right z/down z/right z/right
     (gather-deftest)
     :test
     common/join-nodes)
=> ""Sample test program"\n  1\n  => 1\n  (identical? 2 4)\n  => true"
raw docstring

gather-deftest-bodyclj

(gather-deftest-body zloc)
(gather-deftest-body zloc output)

helper function for gather-deftest

(-> "("Sample test program"\n (is (= 1 1))\n (is (identical? 2 4)))" (z/of-string) z/down (gather-deftest-body) (common/join-nodes)) => ""Sample test program"\n 1\n => 1\n (identical? 2 4)\n => true"

helper function for `gather-deftest`

(-> "(\"Sample test program\"\n  (is (= 1 1))\n  (is (identical? 2 4)))"
    (z/of-string)
    z/down 
    (gather-deftest-body)
    (common/join-nodes))
=> ""Sample test program"\n  1\n  => 1\n  (identical? 2 4)\n  => true"
raw docstring

gather-is-formclj

(gather-is-form zloc)

Make docstring notation out of is form (common/join-nodes (gather-is-form (z/of-string "(is (= 1 1))"))) => "1\n => 1"

(common/join-nodes (gather-is-form (z/of-string "(is (boolean? 4))"))) => "(boolean? 4)\n => true"

Make docstring notation out of is form
(common/join-nodes (gather-is-form (z/of-string "(is (= 1 1))")))
=> "1\n  => 1"

(common/join-nodes (gather-is-form (z/of-string "(is (boolean? 4))")))
=> "(boolean? 4)\n  => true"
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close