pre-report
hook. This allows plugins to inspect and change test
events just before they are passed to the reporter.:kaocha.plugin/notifier
plugin that pops up desktop notifications
when a test run passes or fails.wrap-run
hook to the hooks plugin.tests.edn
for changes:kaocha.watch/ignore [".*" ,,,]
:capture-output? false
, instead
of :kaocha.plugin.capture-output/capture-output? false
. Since this is a
built-in plugin that's enabled by default it makes sense to provide a
shorthand for this.:kaocha.plugin/bindings
plugin that allows setting dynamic var
bindings from tests.edn
pre-load
hook--focus-meta
when none of the tests have this particular metadata.^:kaocha/pending
metadata to skip over them, and report them
as "pending":kaocha.plugin/hooks
), that allows hooking into
various parts of Kaocha's process using simple functions. This provides a more
lightweight alternative to end users for full fledged plugins.pre-test
hook now runs earlier, so that :kaocha.testable/skip
or
:kaocha.testable/pending
can be set from the hook and still be recognized.kaocha.runner/run
, to be used by alternative command
line runners like boot.kaocha.report/tap
)--print-env
flag to the :kaocha.plugin.alpha/info
plugin,
which outputs the Clojure and Java version before each run.jdk.internal.reflect
stack frames when detecting source file (Java 9+)print-invocations
plugin no longer prints out the --config-file
flag
when it hasn't changed from its default value (tests.edn
):kaocha.plugin.alpha/info
,
currently only prints the list of all test ids.:src-paths
, :test-paths
, etc. if they don't deviate
from the defaults. This also means all test suites get the default
:kaocha.filter/skip-meta [:kaocha/skip]
.capture-output?
flag when provided in tests.edn
(is (= ))
assertions with only a single argument as failures, as
these are most likely typos, they always evaluate to true.kaocha.plugin
namespace can now be specified on the command line with their short namekaocha.assertions
namespace with custom clojure.test
assertions. Currently
for internal use but might evolve into its own library.lambdaisland/kaocha
artifact.tests.edn
and on the CLI^:kaocha/skip
by defaultkaocha.report.progress
kaocha.plugin.alpha/xfail
, mark failing tests with ^:kaocha/xfail
to make them pass, and vice versa. (#2)(is (= ,,,))
assertions are now deep diffed and pretty printed.:description
key). (For future use.)--fail-fast
mode is incompatible with the check which fails tests when they don't contain any assertions. (#10)kaocha.repl
does not correctly merge in extra config keyskaocha.repl/run
will still by default run the current *ns*
, rather than all tests.*print-length*
when set. (defaults to 100)kaocha.testable/*current-testable*
is bound when plugin's wrap-run
result executes.meta-merge
for flexible append/prepend/replace.--focus
kaocha.repl/run-all
BREAKING: kaocha.repl/run-tests
and kaocha.repl/run-all-tests
have been
renamed to run
and run-all
, so a (use 'kaocha.repl)
doesn't clash with
clojure.test
.
Skip reloading namespaces during load if they are already defined. In watch
mode they still get reloaded through tools.namespace when necessary. This
change is done to make REPL usage more intuitive. When running
kaocha.repl/run-tests
it will refrain from doing a (require ... :reload)
,
instead accepting whatever state your REPL process is in.
--watch
mode no longer cause the process to exit. Instead you
get a warning and the loading is retried on next change.kaocha.repl
a lot more useful, making it easy to do a full or partial
test run from a REPL or buffer.kaocha.report
namespace now can be specified on the command
line with just their short name, e.g. --reporter dots
#kaocha
use #kaocha/v1
as a reader literal that
normalizes configuration. The old version is still supported for now but
generates a warning.add-classpath
classloader hack so it doesn't mess up the thread
binding stack.:ns-patterns
must be strings, and not regex
literals. Clarified this in the docs.#kaocha
reader literal for configuration. Before: :kaocha.filter/focus
, after: :focus
.:kaocha.hooks/pre-load
hook to complement :kaocha.hooks/post-load
.:kaocha.type/suite
is now called :kaocha.type/clojure.test
--version
command line flag (only works when running from a JAR)--help
as alternative to --test-help
, for environments where --help
isn't shadowedkaocha.repl/run-tests
/ kaocha.repl/run-all-tests
(since renamed to run
and run-all
):kaocha.suite/ns-patterns
, :kaocha.suite/source-paths
and:kaocha.suite/test-paths
have been renamed to just use the :kaocha
namespace.wrap-run
, which allows you
to decorate run-testables
for doing things like adding bindings.fail-fast
is true, quit immediately when a load error is detected,
instead of only failing when the namespace runs.bin/kaocha :unit
--[no-]profiling
, --profiling-count
,
:kaocha.plugin.profiling/profiling?
, :kaocha.plugin.profiling/count
--focus
and --focus-meta
override config-level :focus
/:focus-meta
,
rather than append. This is more intuitive, when focusing from the command
line you don't want extra tests to show up.post-summary
hook when using the API, this prevents noise from
plugins in the --print-test-plan
/ --print-result
output.:kaocha.var/wrap
key, which can contain a seq
of functions that will be used to "wrap" the actual test function, useful e.g.
for providing bindings. clojure.test style :each fixtures are also handled
through this key, so plugins can choose to add wrapping functions at the start
or the end of this seq to wrap "inside" or "around" the fixtures.pre-test
and post-test
plugin hooks, so
that they have access to top level configuration items.kaocha.plugin/defplugin
macro, making plugins look more like a
deftype.#kaocha {}
tagged reader literal in tests.edn
to provide defaults. If you want more
control then overwrite tests.edn
with the output of --print-config
and
tweak.Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close