code.test.compile
fact-eval
added in 3.0
(fact-eval {:keys [ns id], :as fpkg})creates the forms in eval mode
fact-id
added in 3.0
(fact-id {:keys [id refer], :as m} desc)creates an id from fact data
(fact-id {} “hello there”) => ’test-hello-there
fact-prepare-core
added in 3.0
(fact-prepare-core desc? body meta)prepares fact for a core form
fact-prepare-meta
added in 3.0
(fact-prepare-meta id meta desc body)parses and converts fact to symbols
(fact-prepare-meta ’test-hello {} “hello” ’(1 => 1))
fact-skip?
added in 3.0
(fact-skip? x)checks if form should be skipped
(fact-skip? ’(fact:component)) => true
fact:exec
macro
added in 3.0
(fact:exec)(fact:exec id)(fact:exec ns id)runs main hook for fact form
fact:get
macro
added in 3.0
(fact:get)(fact:get id)(fact:get ns id)gets elements of the current fact
fact:missing
added in 3.0
(fact:missing)(fact:missing ns)returns all missing facts for a given namespace
install-fact
added in 3.0
(install-fact meta body)installs the current fact. Warns loudly when a different fact with the same id is already installed in the namespace — the usual cause is two facts sharing one :refer (the id is derived from it), which silently overwrites the earlier fact so that it never runs while the suite stays green. Give one fact a unique :id in its metadata to disambiguate. Re-installing the same fact (same id and description, e.g. a REPL re-eval) replaces silently.
rewrite-top-level
added in 3.0
(rewrite-top-level body)(rewrite-top-level [x y z & more :as arr] out)creates a sequence of pairs from a loose sequence (rewrite-top-level ’(def a 1) (+ a 3) => 5) (contains-in ’[{:type :form, :meta {:line 8, :column 12}, :form ’(def a 1)} {:type :test-equal, :meta {:line 9, :column 12}, :input {:form ’(+ a 3)}, :output {:form 5}}])