ClojureDocs

Nav

Namespaces

Take the 2026 State of Clojure Survey! Help shape the future of Clojure — open through Nov 30. Take Survey →
core.async
core.logic
data.csv
spec.alpha
tools.build
  • clojure
tools.deps

with-test

clojure.test

Available since 1.1 (source)
  • (with-test definition & body)
Takes any definition form (that returns a Var) as the first argument.
Remaining body goes in the :test metadata function for that Var.
 When *load-tests* is false, only evaluates the definition, ignoring
the tests.