clojure.test
*
- value
True by default. If set to false, no test functions will be created by deftest, set-test, or with-test. Use this to...
value- value
The maximum depth of stack traces to print when an Exception is thrown during a test. Defaults to nil, which means pr...
value- value
- value
- value
A
Checks multiple assertions with a template expression. See clojure.template/do-template for an explanation of templa...
macro([argv expr & args])
Returns generic assertion code for any test, including macros, Java method calls, or isolated symbols.
function([msg form])
- multimethod
Returns generic assertion code for any functional predicate. The 'expected' argument to 'report' will contains the or...
function([msg form])
C
Composes two fixture functions, creating a new fixture function that combines their behavior.
function([f1 f2])
D
Defines a test function with no arguments. Test functions may call other tests, so tests may be composed. If you com...
macro([name & body])
Like deftest but creates a private var.
macro([name & body])
Add file and line information to a test result and call report. If you are writing a custom assert-expr method, call ...
function([m])
F
Returns true if argument is a function or a symbol that resolves to a function (not a macro).
function([x])
G
Like var-get but returns nil if the var is unbound.
function([v])
I
Increments the named counter in *report-counters*, a ref to a map. Does nothing if *report-counters* is nil.
function([name])
Generic assertion macro. 'form' is any predicate test. 'msg' is an optional message to attach to the assertion. ...
macro([form] [form msg])
J
Composes a collection of fixtures, in order. Always returns a valid fixture function, even if the collection is empty...
function([fixtures])
R
Generic reporting function, may be overridden to plug in different report formats (e.g., TAP, JUnit). Assertions suc...
multimethodRuns all tests in all namespaces; prints results. Optional argument is a regular expression; only namespaces with na...
function([] [re])
Runs a single test. Because the intent is to run a single test, there is no check for the namespace test-ns-hook.
macro([test-symbol])
Runs the tests for a single Var, with fixtures executed around the test, and summary output after.
function([v])
Runs all tests in the given namespaces; prints results. Defaults to current namespace if none given. Returns a map ...
function([] [& namespaces])
S
Experimental. Sets :test metadata of the named var to a fn with the given body. The var must already exist. Does no...
macro([name & body])
Returns true if the given test summary indicates all tests were successful, false otherwise.
function([summary])
T
Calls test-vars on every var interned in the namespace, with fixtures.
function([ns])
If the namespace defines a function named test-ns-hook, calls that. Otherwise, calls test-all-vars on the namespace. ...
function([ns])
If v has a function in its :test metadata, calls that function, with *testing-vars* bound to (conj *testing-vars* v).
function([v])
Groups vars by their namespace and runs test-var on them with appropriate fixtures applied.
function([vars])
Adds a new string to the list of testing contexts. May be nested, but must occur inside a test function (deftest).
macro([string & body])
Returns a string representation of the current test context. Joins strings in *testing-contexts* with spaces.
function([])
Returns a string representation of the current test. Renders names in *testing-vars* as a list, then the source file ...
function([m])
Used by the 'is' macro to catch unexpected exceptions. You don't call this.
macro([msg form])
U
Wrap test runs in a fixture function to perform setup and teardown. Using a fixture-type of :each wraps every test i...
multimethod
W
Takes any definition form (that returns a Var) as the first argument. Remaining body goes in the :test metadata functi...
macro([definition & body])
Runs body with *out* bound to the value of *test-out*.
macro([& body])