Liking cljdoc? Tell your friends :D

cider.nrepl.middleware.test

Test execution, reporting, and inspection

Test execution, reporting, and inspection
raw docstring

*test-error-handler*clj

A function you can override via binding, or safely via alter-var-root. On test :errors, the related Throwable be invoked as the sole argument passed to this var. For example, you can use this to add an additional println, for pretty-printing Spec failures. Remember to flush if doing so.

A function you can override via `binding`, or safely via `alter-var-root`.
On test `:error`s, the related Throwable be invoked as the sole argument
passed to this var.
For example, you can use this to add an additional `println`,
for pretty-printing Spec failures. Remember to `flush` if doing so.
sourceraw docstring

current-reportclj

An atom holding the results of the test run in progress

An atom holding the results of the test run in progress
sourceraw docstring

handle-retest-opclj

(handle-retest-op {:keys [transport session id] :as msg})
source

handle-stacktrace-opclj

(handle-stacktrace-op {:keys [ns var index transport session id
                              :nrepl.middleware.print/print-fn]
                       :as msg})
source

handle-testclj

(handle-test handler msg & _configuration)
source

handle-test-all-opclj

(handle-test-all-op {:keys [load? include exclude] :as msg})
source

handle-test-opclj

(handle-test-op {:keys [ns tests include exclude] :as msg})
source

handle-test-var-query-opclj

(handle-test-var-query-op {:keys [var-query transport session id] :as msg})
source

reportcljmultimethod

Handle reporting for test events.

This takes a test event map as an argument and updates the current-report atom to reflect test results and summary statistics.

Handle reporting for test events.

This takes a test event map as an argument and updates the `current-report`
atom to reflect test results and summary statistics.
sourceraw docstring

report-fixture-errorclj

(report-fixture-error ns e)

Delegate reporting for test fixture errors to the report function. This finds the erring test fixture in the stacktrace and binds it as the current test var. Test count is decremented to indicate that no tests were run.

Delegate reporting for test fixture errors to the `report` function. This
finds the erring test fixture in the stacktrace and binds it as the current
test var. Test count is decremented to indicate that no tests were run.
sourceraw docstring

report-reset!clj

(report-reset!)
source

resultsclj

An atom holding results of test runs, indexed by namespace. This is used to reference exception objects from erring tests, and to rerun tests (by namespace) that did not pass previously. The var itself will be bound from the nREPL session.

An atom holding results of test runs, indexed by namespace. This is used to
reference exception objects from erring tests, and to rerun tests (by
namespace) that did not pass previously. The var itself will be bound from
the nREPL session.
sourceraw docstring

stack-frameclj

(stack-frame e f)
(stack-frame namespaces e f)

Search the stacktrace of exception e for the function f and return info describing the stack frame, including var, class, and line.

Search the stacktrace of exception `e` for the function `f` and return info
describing the stack frame, including var, class, and line.
sourceraw docstring

test-nsclj

(test-ns ns vars)

If the namespace object defines a function named test-ns-hook, call that. Otherwise, test the specified vars. On completion, return a map of test results.

If the namespace object defines a function named `test-ns-hook`, call that.
Otherwise, test the specified vars. On completion, return a map of test
results.
sourceraw docstring

test-nssclj

(test-nss m)

Call test-ns for each entry in map m, in which keys are namespace symbols and values are var symbols to be tested in that namespace (or nil to test all vars). Symbols are first resolved to their corresponding objects.

Call `test-ns` for each entry in map `m`, in which keys are namespace
symbols and values are var symbols to be tested in that namespace (or `nil`
to test all vars). Symbols are first resolved to their corresponding
objects.
sourceraw docstring

test-resultclj

(test-result ns v m)

Transform the result of a test assertion. Append ns, var, assertion index, and 'testing' context. Retain any exception. Pretty-print expected/actual or use its print-method, if applicable.

Transform the result of a test assertion. Append ns, var, assertion index,
and 'testing' context. Retain any exception. Pretty-print expected/actual or
use its `print-method`, if applicable.
sourceraw docstring

test-varclj

(test-var v)

If var v has a function in its :test metadata, call that function, with clojure.test/*testing-vars* bound to append v.

If var `v` has a function in its `:test` metadata, call that function,
with `clojure.test/*testing-vars*` bound to append `v`.
sourceraw docstring

test-var-queryclj

(test-var-query var-query)

Call test-ns for each var found via var-query.

Call `test-ns` for each var found via var-query.
sourceraw docstring

test-varsclj

(test-vars ns vars)

Call test-var on each var, with the fixtures defined for namespace object ns.

Call `test-var` on each var, with the fixtures defined for namespace object
`ns`.
sourceraw docstring

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

× close