Liking cljdoc? Tell your friends :D

volley.hooks

Kaocha's hooks plugin and volley's :volley/worker-setup, as data.

Kaocha runs every hook in its one process. volley has a parent that plans and reports and workers that load and run namespaces, so each hook runs where its work happens. semantics is the table, and doc/design.md explains it. This namespace is pure: it reads the hook configuration out of the Kaocha config, builds the {:op :configure} message for workers, and builds the Kaocha-shaped maps hooks receive (testables, the test plan, the result). Hooks are resolved and called by volley.shell.worker and, for post-summary, volley.main.

Kaocha's hooks plugin and volley's `:volley/worker-setup`, as data.

Kaocha runs every hook in its one process. volley has a parent that plans
and reports and workers that load and run namespaces, so each hook runs
where its work happens. `semantics` is the table, and doc/design.md
explains it. This namespace is pure: it reads the hook configuration out
of the Kaocha config, builds the `{:op :configure}` message for workers,
and builds the Kaocha-shaped maps hooks receive (testables, the test plan,
the result). Hooks are resolved and called by `volley.shell.worker` and,
for `post-summary`, `volley.main`.
raw docstring

configure-messageclj

(configure-message config)

The {:op :configure} message every worker gets before its first run, or nil when no hook, worker setup or custom reporter is configured. :reporters are the project's own reporter symbols (--reporter, :kaocha/reporter), which the workers call with each clojure.test event.

The `{:op :configure}` message every worker gets before its first run,
or nil when no hook, worker setup or custom reporter is configured.
`:reporters` are the project's own reporter symbols (`--reporter`,
`:kaocha/reporter`), which the workers call with each clojure.test
event.
sourceraw docstring

engine-optsclj

(engine-opts config)

The hook options of volley.engine/init for normalized config: :configure (the message for workers) and :post-summary (the parent's hooks), each nil when not configured.

The hook options of `volley.engine/init` for normalized `config`:
`:configure` (the message for workers) and `:post-summary` (the parent's
hooks), each nil when not configured.
sourceraw docstring

hook-key?clj

(hook-key? k)

True for a :kaocha.hooks/... key.

True for a `:kaocha.hooks/...` key.
sourceraw docstring

hook-keysclj

(hook-keys m)

The :kaocha.hooks/... keys of m.

The `:kaocha.hooks/...` keys of `m`.
sourceraw docstring

kaocha-configclj

(kaocha-config config)

A Kaocha-shaped config for normalized config, which hooks get where Kaocha passes its config or test plan.

A Kaocha-shaped config for normalized `config`, which hooks get where
Kaocha passes its config or test plan.
sourceraw docstring

kaocha-resultclj

(kaocha-result config suite-of run)

The test result post-summary hooks get: Kaocha's shape (:kaocha.result/tests, suites holding namespaces holding vars with :kaocha.result/count, pass, fail, error and pending; vars skipped by a filter carry :kaocha.testable/skip and no counts) built from volley's run state. suite-of maps each namespace to its suite id.

The test result `post-summary` hooks get: Kaocha's shape
(`:kaocha.result/tests`, suites holding namespaces holding vars with
`:kaocha.result/count`, `pass`, `fail`, `error` and `pending`; vars
skipped by a filter carry `:kaocha.testable/skip` and no counts) built
from volley's run state. `suite-of` maps each namespace to its suite id.
sourceraw docstring

kaocha-test-planclj

(kaocha-test-plan config plan)

--print-test-plan: Kaocha's test plan shape (kaocha.api/test-plan) for normalized config and plan (volley.select/plan), suites holding the planned namespaces holding the test vars the parser saw. A var the filters skip carries :kaocha.testable/skip, as in Kaocha; tests a macro defines appear only once loaded, so not here. volley's own part of the plan is under :volley/* keys: each suite's filter passes once, each namespace's :volley/serial?, and the namespaces workers preload.

`--print-test-plan`: Kaocha's test plan shape (`kaocha.api/test-plan`)
for normalized `config` and `plan` (`volley.select/plan`), suites holding
the planned namespaces holding the test vars the parser saw. A var the
filters skip carries `:kaocha.testable/skip`, as in Kaocha; tests a
macro defines appear only once loaded, so not here. volley's own part of
the plan is under `:volley/*` keys: each suite's filter passes once, each
namespace's `:volley/serial?`, and the namespaces workers preload.
sourceraw docstring

pluginclj

The plugin that turns Kaocha's hooks on.

The plugin that turns Kaocha's hooks on.
sourceraw docstring

read-hooksclj

(read-hooks m allowed where)

The hooks in map m (the top-level config or one suite). allowed is the set of supported short keys; where is text for warnings such as " (suite :unit)". Returns {:hooks {short-key [entry ...]} :warnings [str]}, only non-empty vectors kept.

The hooks in map `m` (the top-level config or one suite). `allowed` is
the set of supported short keys; `where` is text for warnings such as
" (suite :unit)". Returns `{:hooks {short-key [entry ...]} :warnings
[str]}`, only non-empty vectors kept.
sourceraw docstring

read-worker-setupclj

(read-worker-setup m where)

[entries warnings] for :volley/worker-setup in m.

`[entries warnings]` for `:volley/worker-setup` in `m`.
sourceraw docstring

semanticsclj

Where and when each :kaocha.hooks/* key runs in volley.

Where and when each `:kaocha.hooks/*` key runs in volley.
sourceraw docstring

suite-keysclj

Hook keys Kaocha accepts on a suite (kaocha.plugin.hooks, load-testable-level-hooks).

Hook keys Kaocha accepts on a suite (`kaocha.plugin.hooks`,
`load-testable-level-hooks`).
sourceraw docstring

suite-testableclj

(suite-testable {:keys [id type test-paths source-paths ns-patterns focus skip
                        focus-meta skip-meta]})

The Kaocha testable of normalized suite suite, as hooks see it, with the suite's own filters under Kaocha's :kaocha.filter/* keys.

The Kaocha testable of normalized suite `suite`, as hooks see it, with
the suite's own filters under Kaocha's `:kaocha.filter/*` keys.
sourceraw docstring

top-level-keysclj

Hook keys Kaocha accepts at the top of tests.edn.

Hook keys Kaocha accepts at the top of tests.edn.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close