cljs.test
*
- value
A
Checks multiple assertions with a template expression. See clojure.template/do-template for an explanation of templates....
macro([argv expr & args])
Returns generic assertion code for any test, including macros, Java method calls, or isolated symbols.
function([msg form])
- multimethod
([menv msg form])
Returns generic assertion code for any functional predicate. The 'expected' argument to 'report' will contains the orig...
function([msg form])
Wraps body as a CPS function that can be returned from a test to continue asynchronously. Binds done to a function that...
macro([done & body])
Returns whether x implements IAsyncTest.
function([x])
B
Tag a seq of fns to be picked up by run-block as injected continuation. See run-block.
function([fns])
C
- function
([])
Composes two fixture functions, creating a new fixture function that combines their behavior. NOTE: Incompatible with m...
function([f1 f2])
D
Defines a test function with no arguments. Test functions may call other tests, so tests may be composed. If you compo...
macro([name & body])
- function
([m])
E
Generates a testing environment with a reporter. (empty-env) - uses the :cljs.test/default reporter. (empty-env :cljs.te...
function([] [reporter])
F
- function
([exception depth])
Returns true if argument is a function or a symbol that resolves to a function (not a macro).
function([menv x])
G
- function
([])
- function
([])
I
Marker protocol denoting CPS function to begin asynchronous testing.
protocolIncrements 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. Exampl...
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])
- function
([stack-element])
- function
([stack-element])
M
- function
([filename line column])
N
- function
([x])
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 names ...
macro([] [re] [re env])
Invoke all functions in fns with no arguments. A fn can optionally return an async test - is invoked with a continuatio...
function([fns])
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 all tests in the given namespaces; prints results. Defaults to current namespace if none given. Does not return a m...
macro([] [env-or-ns] [env-or-ns & namespaces])
Like test-vars, but returns a block for further composition and later execution.
macro([env-or-ns & namespaces])
S
- function
([new-env])
Returns true if the given test summary indicates all tests were successful, false otherwise.
function([summary])
T
Calls test-vars on every var with :test metadata interned in the namespace, with fixtures.
macro([[quote ns :as form]])
- macro
([[quote ns]])
If the namespace defines a function named test-ns-hook, calls that. Otherwise, calls test-all-vars on the namespace. 'n...
macro([ns] [env [quote ns :as form]])
Like test-ns, but returns a block for further composition and later execution. Does not clear the current env.
macro([env [quote ns :as form]])
If v has a function in its :test metadata, calls that function, add v to :testing-vars property of env.
function([v])
Like test-var, but returns a block for further composition and later execution.
function([v])
Groups vars by their namespace and runs test-var on them with appropriate fixtures assuming they are present in the curr...
function([vars])
Like test-vars, but returns a block for further composition and later execution.
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 an...
function([m])
Used by the 'is' macro to catch unexpected exceptions. You don't call this.
macro([msg form])
U
- function
([ks f & args])
- macro
([type & fns])