Liking cljdoc? Tell your friends :D

prpr3.test


compose-fixturesclj/s≠

clj
cljs
(compose-fixtures f1 f2)

deals properly with cljs async map fixtures

deals properly with cljs async map fixtures
source (clj)source (cljs)raw docstring

deftestclj/smacro

(deftest nm & body)

define a test whose body will be evaluated with test-async. it looks very like a normal sync deftest, but it is not. there are some caveats, viz:

NOTE: when using a let to provide common values to a series of testing forms, use a tlet instead - it will wrap the forms as a vector of 0-args fns, so none get forgotten (let only returns its final value) and they all get evaluated serially

NOTE: use the same name as clojure.test/deftest because CIDER recognizes it and uses it to find tests

define a test whose body will be evaluated with test-async. it
looks very like a normal sync deftest, **but it is not**. there are
some caveats, viz:

NOTE: when using a let to provide common values to a series of
testing forms, use a tlet instead - it will wrap the forms
as a vector of 0-args fns, so none get forgotten (let only
returns its final value) and they all get evaluated serially

NOTE: use the same name as clojure.test/deftest because CIDER
recognizes it and uses it to find tests
sourceraw docstring

deftest*clj/smacro

(deftest* nm & body)
source

isclj/smacro

(is & body)
source

record-test-binding-frameclj/smacro

(record-test-binding-frame & body)
source

test-asyncclj/smacro

(test-async nm & forms)

the body of test-async is a form or forms that when evaluated return:

<plain-value> | Promise<plain-value> | fn | Sequence<fn>

test-async serially evaluates the forms, and any which yield fn or Sequence<fn> will be immediately called, also serially

the body of test-async is a form or forms that
when evaluated return:

<plain-value> | Promise<plain-value> | fn | Sequence<fn>

test-async *serially* evaluates the forms, and any which yield
fn or Sequence<fn> will be immediately called, also serially
sourceraw docstring

test-binding-frameclj

source

testingclj/smacro

(testing s & forms)

each testing form body is evaluated in the same manner as a deftest body

each testing form body is evaluated in the same manner as a deftest
body
sourceraw docstring

tletclj/smacro

(tlet bindings & forms)

a let which turns its body forms into a vector of 0-args fns, to be used inside deftests so that all the testing forms inside the let are retained and evaluated serially

a let which turns its body forms into a vector of 0-args fns,
to be used inside deftests so that all the testing forms inside
the let are retained and evaluated serially
sourceraw docstring

use-fixturesclj/smacro

(use-fixtures & body)
source

with-log-levelclj/smacro

(with-log-level log-level & forms)

temporarily set the log-level while executing the forms

temporarily set the log-level while executing the forms
sourceraw docstring

with-log-level-fixtureclj/s

(with-log-level-fixture level)
source (clj)source (cljs)

with-test-binding-frameclj/smacro

(with-test-binding-frame & body)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close