(bind definition & forms)Binds the output of forms to the given vars, returning it.
In a test-comment context, this only establishes lexical bindings!
Binds the output of `forms` to the given vars, returning it. In a `test-comment` context, this only establishes lexical bindings!
(effect & forms)Evaluates forms for a side effect, also in a test-comment context.
Evaluates `forms` for a side effect, also in a `test-comment` context.
Transforms the expansion of the forms following form, represented
as a sequence of forms that will eventually be spliced into a do
or similar constructs.
Dispatches on the resolved head of the form if it's a var.
Transforms the expansion of the forms following `form`, represented as a sequence of forms that will eventually be spliced into a `do` or similar constructs. Dispatches on the resolved head of the form if it's a var.
(remove-all-tests!)(remove-all-tests! the-ns)Removes all tests in the namespace, defaulting to *ns*.
Removes all tests in the namespace, defaulting to `*ns*`.
(test-comment test-name [form-head & comment-forms :as wrapped-form])Wraps a comment form, expanding into a deftest with the given test-name.
Wraps a `comment` form, expanding into a `deftest` with the given `test-name`.
(value form & body)Like values but anaphorically binds to it, and returns the single value bound to :value
rather than a :values map.
Errors out if it is already bound.
Like `values` but anaphorically binds to `it`, and returns the single value bound to `:value` rather than a `:values` map. Errors out if `it` is already bound.
(values [& bindings] & body)Behaves like a let, but returns a map where :result is bound to the value of the last form in body,
and :values is bound to a map from the symbols in the left hand sides of the bindings to their value.
In a test-comment context, behaves like a let that evaluates its body in a test-comment context.
Behaves like a `let`, but returns a map where `:result` is bound to the value of the last form in `body`, and `:values` is bound to a map from the symbols in the left hand sides of the bindings to their value. In a `test-comment` context, behaves like a `let` that evaluates its body in a `test-comment` context.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |