Liking cljdoc? Tell your friends :D

volley.filters

Kaocha's filter rules (kaocha.plugin.filter) for one var at a time: what a worker needs to decide which vars run. volley.select builds the plan with them in the parent. Kept apart from volley.select, which reads source files with edamame, so that a worker loads none of that.

Kaocha's filter rules (`kaocha.plugin.filter`) for one var at a time:
what a worker needs to decide which vars run. `volley.select` builds the
plan with them in the parent. Kept apart from `volley.select`, which
reads source files with edamame, so that a worker loads none of that.
raw docstring

decideclj

(decide select-spec ns-sym var-sym var-meta)
(decide select-spec ns-sym ns-meta var-sym var-meta)

Decide whether a test var runs. select-spec is the :select value from plan; var-meta is the var's real metadata and the namespace metadata comes from the spec's static copy (the 5-arity takes the namespace's real metadata instead). Returns {:run? bool :reason kw} where reason is :selected, :skip, :skip-meta, :not-focused or :pending. A :var-pattern in the spec (watch mode's test-name filter) makes vars whose names do not match it :not-focused.

Skips are decided before :kaocha/pending, as in kaocha.testable/run-testable.

Decide whether a test var runs. `select-spec` is the `:select` value from
`plan`; `var-meta` is the var's real metadata and the namespace metadata
comes from the spec's static copy (the 5-arity takes the namespace's real
metadata instead). Returns `{:run? bool :reason kw}` where reason is
`:selected`, `:skip`, `:skip-meta`, `:not-focused` or `:pending`. A
`:var-pattern` in the spec (watch mode's test-name filter) makes vars
whose names do not match it `:not-focused`.

Skips are decided before `:kaocha/pending`, as in `kaocha.testable/run-testable`.
sourceraw docstring

matches?clj

(matches? {:keys [id meta]} filters meta-filters)

kaocha.plugin.filter/matches? (without aliases, which volley's test types never set). Ids are keywords: ns :my.ns, var :my.ns/foo, suite :unit. Note that, as in Kaocha, a keyword filter never matches a namespace by (str filter); only symbols and strings do.

`kaocha.plugin.filter/matches?` (without aliases, which volley's test types
never set). Ids are keywords: ns `:my.ns`, var `:my.ns/foo`, suite `:unit`.
Note that, as in Kaocha, a keyword filter never matches a namespace by
`(str filter)`; only symbols and strings do.
sourceraw docstring

merge-filtersclj

(merge-filters f1 f2)

kaocha.plugin.filter/merge-filters.

`kaocha.plugin.filter/merge-filters`.
sourceraw docstring

missing-meta-warningclj

(missing-meta-warning k)

Kaocha's warning (remove-missing-metadata-keys) for a focus-meta key no test carries.

Kaocha's warning (`remove-missing-metadata-keys`) for a focus-meta key no
test carries.
sourceraw docstring

prepareclj

(prepare select-spec)

The select spec ready for deciding many vars: its :var-pattern compiled once (as :var-re), rather than once per var. Workers call it once per namespace; the spec that crosses the process boundary stays EDN.

The select spec ready for deciding many vars: its `:var-pattern`
compiled once (as `:var-re`), rather than once per var. Workers call it
once per namespace; the spec that crosses the process boundary stays
EDN.
sourceraw docstring

resolve-focus-metaclj

(resolve-focus-meta select-spec used)

Settle the select spec's :resolve-focus-meta keys once the worker has loaded every namespace of the run: keys in used (see used-meta) stay, the others are dropped, as Kaocha's remove-missing-metadata-keys drops them from the suite's filters and the global ones, and the spec's passes are rebuilt from its :pass-inputs without them. Returns {:select spec :dropped [k]}; a spec with nothing to resolve comes back unchanged.

Settle the select spec's `:resolve-focus-meta` keys once the worker has
loaded every namespace of the run: keys in `used` (see `used-meta`) stay,
the others are dropped, as Kaocha's `remove-missing-metadata-keys` drops
them from the suite's filters and the global ones, and the spec's passes
are rebuilt from its `:pass-inputs` without them. Returns `{:select spec
:dropped [k]}`; a spec with nothing to resolve comes back unchanged.
sourceraw docstring

runs-namespace?clj

(runs-namespace? ns-meta {:keys [run skipped]})

Whether a namespace with metadata ns-meta and vars split by volley.shell.worker/partition-vars ({:run [var ...] :skipped [[var reason] ...]}) is run at all: its hooks and :once fixtures around the vars in run. kaocha.testable/run-testable runs a namespace unless it is pending itself or every test in it is skipped, and a pending var is not skipped, so a namespace whose vars are all pending still runs its :once fixtures.

Whether a namespace with metadata `ns-meta` and vars split by
`volley.shell.worker/partition-vars` (`{:run [var ...] :skipped [[var
reason] ...]}`) is run at all: its hooks and `:once` fixtures around the
vars in `run`. `kaocha.testable/run-testable` runs a namespace
unless it is pending itself or every test in it is skipped, and a
pending var is not skipped, so a namespace whose vars are all pending
still runs its `:once` fixtures.
sourceraw docstring

suite-passesclj

(suite-passes suite own global)

The passes workers apply for suite with its own filters own and the global ones: the suite's filters first, then the global ones, which see the suite's skip keys too.

The passes workers apply for `suite` with its own filters `own` and the
global ones: the suite's filters first, then the global ones, which see
the suite's skip keys too.
sourceraw docstring

used-metaclj

(used-meta metas)

Metadata keys that are truthy in any of metas (namespace and var metadata), as keywords, like kaocha.plugin.filter/truthy-keys.

Metadata keys that are truthy in any of `metas` (namespace and var
metadata), as keywords, like `kaocha.plugin.filter/truthy-keys`.
sourceraw docstring

without-focus-metaclj

(without-focus-meta filters dropped)

filters without the focus-meta keys in dropped (keywords).

`filters` without the focus-meta keys in `dropped` (keywords).
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