Liking cljdoc? Tell your friends :D
Clojure only.

scry.kaocha

In-process kaocha runner producing scry's inspectable result map.

Kaocha already captures per-test clojure.test events and (via its capture-output plugin) per-test output. This adapter runs kaocha programmatically and transforms its result tree into scry's result model.

Note: kaocha merges stdout and stderr into a single captured stream, so for kaocha results the combined output is placed in :out and :err is empty.

In-process kaocha runner producing scry's inspectable result map.

Kaocha already captures per-test clojure.test events and (via its
capture-output plugin) per-test output. This adapter runs kaocha
programmatically and transforms its result tree into scry's result model.

Note: kaocha merges stdout and stderr into a single captured stream, so for
kaocha results the combined output is placed in :out and :err is empty.
raw docstring

runclj

(run)
(run opts)

Run kaocha tests in-process and return scry's inspectable result map.

Options: :config a fully-formed kaocha config map (overrides loading tests.edn) :suite a single suite selector :suites a collection of suite selectors :source-paths fallback source dirs when no :config or tests.edn exists :test-paths fallback test dirs when no :config or tests.edn exists :ns-patterns fallback namespace-name regex strings :result-format suite-scope formatting overrides :progress-callback optional function called after each completed test var :kaocha-argv a vector of raw -m CLI strings forwarded verbatim by the scry CLI in Kaocha mode (every token that is not a scry-owned flag: unknown --flags, their values, and positional suite names). They are parsed with Kaocha's own CLI machinery (its tools.cli spec plus active plugins' option hooks); parsed cli-options are merged like :kaocha-extra (resolved :config authoritative on conflict) and positional selectors are routed through the same :suite/:suites resolution. Malformed Kaocha options surface as a runner/load error rather than an argument error. A forwarded --config-file/-c value loads that Kaocha config (resolved :config still wins); only the parser-injected tests.edn default is dropped. This option is -m-only; the -X map path uses :kaocha-extra. :kaocha-extra a map of raw Kaocha cli-options forwarded by the scry CLI's bounded pass-through (e.g. :focus). It is merged into the resolved config's :kaocha/cli-options with the resolved :config authoritative on conflict. Known values are coerced (:focus raw string/symbol/keyword scalar or collection becomes a vector of keywords); unknown keys are forwarded as-is, so a mistyped key surfaces as a runner or load error rather than an argument error.

When :config is omitted, the current project's tests.edn is loaded if it exists; otherwise a synthetic :unit suite is built from :source-paths, :test-paths, and :ns-patterns.

Suite selectors match configured suite ids by exact value first, then by unique text ("string" ids/selectors as-is, keywords and symbols by name). Use :suite for a single selector; :suites must be a non-empty collection. Unknown or ambiguous selectors, and supplying both :suite and :suites, throw ex-info.

The adapter defaults to suite scope because its public options do not mirror the namespace/var selectors of scry.core/run. Kaocha's capture-output plugin merges stdout and stderr, so combined output is placed in :out and :err is empty.

When Kaocha randomizes test order (its default), the randomize seed is surfaced as :seed in the result :summary so a failing order can be reproduced; the framework's own stray "Randomized with --seed N" stdout print is suppressed.

Returns the same scoped result model as scry.core/run.

Run kaocha tests in-process and return scry's inspectable result map.

Options:
  :config             a fully-formed kaocha config map (overrides loading tests.edn)
  :suite              a single suite selector
  :suites             a collection of suite selectors
  :source-paths       fallback source dirs when no :config or tests.edn exists
  :test-paths         fallback test dirs when no :config or tests.edn exists
  :ns-patterns        fallback namespace-name regex strings
  :result-format      suite-scope formatting overrides
  :progress-callback  optional function called after each completed test var
  :kaocha-argv        a vector of raw `-m` CLI strings forwarded verbatim by
                      the scry CLI in Kaocha mode (every token that is not a
                      scry-owned flag: unknown `--flags`, their values, and
                      positional suite names). They are parsed with Kaocha's
                      own CLI machinery (its `tools.cli` spec plus active
                      plugins' option hooks); parsed cli-options are merged
                      like `:kaocha-extra` (resolved `:config` authoritative
                      on conflict) and positional selectors are routed through
                      the same `:suite`/`:suites` resolution. Malformed Kaocha
                      options surface as a runner/load error rather than an
                      argument error. A forwarded `--config-file`/`-c` value
                      loads that Kaocha config (resolved `:config` still wins);
                      only the parser-injected `tests.edn` default is dropped.
                      This option is `-m`-only; the `-X` map path uses
                      `:kaocha-extra`.
  :kaocha-extra       a map of raw Kaocha cli-options forwarded by the scry
                      CLI's bounded pass-through (e.g. `:focus`). It is merged
                      into the resolved config's :kaocha/cli-options with the
                      resolved :config authoritative on conflict. Known values
                      are coerced (`:focus` raw string/symbol/keyword scalar or
                      collection becomes a vector of keywords); unknown keys are
                      forwarded as-is, so a mistyped key surfaces as a runner or
                      load error rather than an argument error.

When :config is omitted, the current project's tests.edn is loaded if it
exists; otherwise a synthetic :unit suite is built from :source-paths,
:test-paths, and :ns-patterns.

Suite selectors match configured suite ids by exact value first, then by
unique text (`"string"` ids/selectors as-is, keywords and symbols by
`name`). Use :suite for a single selector; :suites must be a non-empty
collection. Unknown or ambiguous selectors, and supplying both :suite and
:suites, throw `ex-info`.

The adapter defaults to suite scope because its public options do not mirror
the namespace/var selectors of `scry.core/run`. Kaocha's capture-output
plugin merges stdout and stderr, so combined output is placed in :out and
:err is empty.

When Kaocha randomizes test order (its default), the randomize seed is
surfaced as `:seed` in the result `:summary` so a failing order can be
reproduced; the framework's own stray "Randomized with --seed N" stdout
print is suppressed.

Returns the same scoped result model as `scry.core/run`.
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