code.framework.test.fact

gather-fact

added in 3.0

(gather-fact nav)

Make docstring notation out of fact form (-> “^{:refer example/hello-world :added "0.1"} (fact "Sample test program"\n (+ 1 1) => 2\n (long? 3) => true)” (nav/parse-string) nav/down nav/right nav/down nav/right (gather-fact) (update-in :test docstring/->docstring)) => (just-in {:form ’fact :ns ’example, :var ’hello-world, :refer ’example/hello-world :added “0.1”, :line {:row 2, :col 8, :end-row 4, :end-col 21} :intro “Sample test program”, :sexp h/form? :test “\n (+ 1 1) => 2\n (long? 3) => true”})

gather-fact-body

added in 3.0

(gather-fact-body nav)(gather-fact-body nav output)

helper function for gather-fact (-> “(\n (+ 1 1) => 2\n (long? 3) => true)” nav/parse-string nav/down (gather-fact-body) (docstring/->docstring)) => “\n (+ 1 1) => 2\n (long? 3) => true”

top-level-fact-navs

(top-level-fact-navs zloc)