--notification-timeout
or
:kaocha.plugin.notifier/timeout
. Note that this feature doesn't work for
terminal-notifier on macOS, with Java's built-in TrayIcon, or with
notify-send on certain Linux desktop environments and distributions.--watch
. Previously, profiles would be
respected on the initial load, but not after watch reloaded the configuration.java.lang.IllegalArgumentException: No matching clause: []
exception
when :kaocha.spec.test.check/syms
is a collection.(is (= ...))
assertions sometimes fails
when comparing records.--no-notifications
flag in the Notifier pluginlambdaisland/deep-diff
to lambdaisland/deep-diff2
kaocha.api
a reporter is specified as a functiongc-profiling
, which was caused by a prior fix from 1.67.1055.test-paths
and ns-patterns
configuration keys.gc-profiling
plugin when there's too many bytes.kaocha.config/load-config
to also work on resourcesgc-profiling
plugin when there's a syntax error.--watch
with Beholder.:kaocha.watch/type
which takes either :beholder
or
:hawk
as values. Defaulting to :beholder
as the new fs watcher.--no-fail-fast
CLI option:watch?
when using exec-fn
--focus
would
result in "no tests found", shadowing the actual error:kaocha/bindings
higher in the stack, so they are visible to main
and post-summary
plugin hooksgc-profiling
that caused itermittent NullPointerException
skaocha.runner/exec
for use with Clojure CLI's -X featuregc-profiling
plugin for measuring the memory usage of tests.kaocha.plugin
-namespace in front.:as-alias
kaocha.watch
could not resolve symbol require
error that occured sporadically when requiring certain kaocha namespaces.deps.edn
/project.clj
if you want
to use the Orchestra plugin.--diff-style :none
on the command line or :diff-style :none
in tests.edn
..gitignore
and .ignore
. To enable
this feature, set :kaocha.watch/use-ignore-file
to true in your deps.edn.notify-send
or terminal-notifier
.:kaocha.test-plan/load-error
that
caused a ClassCastException whenever a generator was created for it.clojure.test.check
dependency (follow-up)If the value of a configuration key is not a collection or symbol, a more helpful error message is output. Fixes #124
kaocha.type.spec.test.check
now correctly builds fdef testables with
configuration options from their enclosing test suites.kaocha.plugin.alpha.spec-test-check
now honors command line arguments based
upon all of the configured STC suites rather than the static
:generative-fdef-checks
selector.clojure.test.check
would be required for Kaocha to work,
rather than being an optional dependencytests.edn
) is now validated with spec, meaning
existing configs may fail. In most cases you should be able to update your
config so it is valid, but please do report any issues.kaocha.plugin.alpha.spec-test-check
now respects a priority of supplied
configuration. CLI options always take precedence, followed by options
specified in individual test suites, followed by global options.:clojure.spec.test.check/instrument?
and :clojure.spec.test.check/check-asserts?
from tests.edn
:kaocha.plugin/debug
for easy introspection of Kaocha's machinery(kaocha.repl/run {:kaocha.filter/skip [:unit]})
post-summary
when used from hooks plugin:kaocha.hooks/pre-load-test
,
:kaocha.hooks/post-load-test
:kaocha.hooks/pre-load-test
,
:kaocha.hooks/pre-test
/ :kaocha.hooks/post-test
and
:kaocha.hooks/post-load-test
hooks to be defined on the testable (i.e. on
the test suite):post-summary
hook can now be used through the hooks plugin (before it
was only available to plugins):kaocha.testable/aliases
to
testables, these can be used when focusing/skipping:kaocha.hooks/before
/ :kaocha.hooks/after
now get converted to
:kaocha.hooks/pre-test
/ :kaocha.hooks/post-test
hooks. The former are
considered deprecated but will continue to work.post-summary
hook will also be called when invoked via kaocha.repl
kaocha.testable/test-seq
only returns actual testables, not a top level
config/test-plan map:orchestra
plugin.:kaocha.hooks/before
and :kaocha.hooks/after
:kaocha.watch/hawk-opts
:kaocha.testable/skip-add-classpath?
flag on the test suite to
prevent Kaocha from modifying the classpath:kaocha.plugin/orchestra
for instrumenting
functions specs with Orchestra:kaocha.plugin/preloads
for requiring namespaces
before Kaocha loads test suites. This is useful for requiring spec
namespaces or other side-effecting namespaces that are not required
by test code.:kaocha.report/printed-expression
to the debug
reporter, for
debugging reporting issues with kaocha-cljstests.edn
, e.g.
:notifier
instead of :kaocha.plugin/notifier
, similar to what we do on the
command line.=?
macro as used in Expectations
(thanks @dharrigan 🎉)set!
in watch mode. (thanks
@frenchy64):config
hooks in the hooks plugin.tests.edn
, once for command-line/REPL options. The result is that
command line options can only narrow the set of tests to be run. (thanks
@otwieracz)#meta-merge
reader literal for tests.edn
. (thanks
@RickyMoynihan)underive
."1.8.0_212-20190523183340.buildslave.jdk8u"
--focus
warning when applicable--profile
command line flag, which gets passed to Aero's #profile {}
tagged literal reader. Defaults to :ci
when CI=true
.--focus TESTABLE-ID
does not match any tests.kaocha.report.progress/progress
progress bar reporter now allows the
appropriate exception to be reported when there is a syntax error in Clojure
source code. Was formerly throwing NullPointerException.kaocha.hierarchy
, so it can be used for kaocha-cljstests.edn
--watch
when invoked without a [:kaocha/cli-options :config-file]
,
either because tests.edn
doesn't exist, or the config originated elsewhere.kaocha.repl/config
set [:kaocha/cli-options :config-file]
if
applicable.--watch
higher up, to prevent certain errors from being
silently ignored.tests.edn
, we now try to load the
given namespaces before setting the bindings.kaocha.plugin
can now be specified as simple (rather
than namespaced) keywords.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? These fine people already did:
Arne Brasseur, Alys Brooks, A Brooks, Mitesh Shah, Rob Hanlon, Jeroen de Jong, David Harrigan, John Shaffer, Emlyn Corrin, Colin Kahn, Sergio Zharinov, Laurence Chen, Wes Morgan, lread, Frank Wang, Daniel Compton, Imre Kószó & Magnar SveenEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close