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