Breaks project into two, com.jakemccrary/test-refresh
and com.jakemccrary/lein-test-refresh
. As the names suggest, lein-test-refresh
continues being the Leiningen plugin while test-refresh
contains the core functionalty. This starts supporting deps.edn
based projects.
org.clojure/tools.namespace
dependency to 1.1.0
.org.clojure/tools.cli
.^:test-refresh/focus
to no longer focus.:test-refresh/focus
, to be overridden by
specifying :focus-flag
key value pair in test-refresh configuration.com.jakemccrary.test-refresh/run-in-repl
. This function is
intended to be called from Cursive's repl so that stacktraces become
clickable. See issue
#80. Details
below.To call com.jakemccrary.test-refresh/run-in-repl
from a repl, add lein-test-refresh
as a dependency to your project. Start a repl and then do the following. run-in-repl
takes one or more paths to your test directories.
user> (require 'com.jakemccrary.test-refresh)
user> (com.jakemccrary.test-refresh/run-in-repl "test")
TEST OUTPUT HERE
Hitting CTRL-C stops the tests. This repl is otherwise not useful. Any project.clj or profiles.clj settings are not known by test-refresh
and as a result are not honored.
:test-refresh/focus true
as metadata onto test or namespace. Vars
with this metadata on it are given priority and test-refresh will
only run them until all :test-refresh/focus
markers are removed
from your project. Example below.(deftest ^:test-refresh/focus test-addition
(is (= 2 (+ 1 1))))
0.20.0
:leiningen/test
profile before running
tests. Addresses
PR #67.lein test-refresh :run-once
exits with a non-zero (1) exit code when tests fail.:stack-trace-depth
flag to configuration. Value is bound to clojure.test/*stack-trace-depth*
.:refresh-dirs
flag. The value is a sequence of
directories that should be refreshed when a refresh is
triggered. (Value is passed through to
clojure.tools.namespace.repl/set-refresh-dirs).:watch-dirs
flag to specify what directories to monitor for
changes.org.clojure/tools.namespace
throws an
exception parsing a namespace declaration.:with-repl
flag to start a REPL for interacting
with your project. More details in README.md and
this pull
request.:run-once
.:changes-only
flag in your configuration or at the command
line. See sample.project.clj for details.lein2
directory for example.org.clojure/tools.namespace
to 0.2.11. This improves cljc support.lein-test-refresh
can suppress clojure.test
's Testing
namespace output. Very useful on projects with a large number of test
namespaces for keeping the terminal useful.org.clojure/tools.namespace
dependency to 0.2.10.lein-test-refresh
releases no longer have a Clojure dependency.org.clojure/tools.namespace
0.2.8.org.clojure/tools.namespace
0.2.7.lein test-refresh
now includes the :test
profile. (same behavior
as lein test
)org.clojure/tools.namespace
0.2.6.leinjacker
0.4.2lein-test-refresh
continuously polled filesystem
for changes.Pretend you have a project.clj
that looks like the one below.
(defproject example "0.1.0-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.5.1"]]
:plugins [[com.jakemccrary/lein-test-refresh "0.4.0"]]
:test-selectors {:default (constantly nil)
:integration :integration
:unit (complement :integration)
:fast (complement :slow)})
If you run lein test-refresh
then the :default
entry the value of
:test-selectors
will be used. In this example that would cause no
tests to run. If you run lein test-refresh :integration
it will only
run tests that have a truthy value for :integration
in either the
test's metadata or in the metadata of the containing namespace.
This version does not support either lein test :only namespace
or lein test namespace
.
:test-refresh {:notify-on-success false}
in project.clj
or
.lein/profiles.clj
to disable notifications and growl alerts if all tests pass.:test-refresh {:growl true}
in project.clj
or
.lein/profiles.clj
to turn on growl notifications.:test-refresh {:notify-command ["command" "arguments"]}
is in
your project.clj then a summary message is passed into that command.Recommend that you don't use. Versions that were published but within a few minutes realized mistakes were made.
lein autoexpect :growl
org.clojure/tools.namespace 0.2.1
. This version of
tools.namespace provides better backwards compatibility with
versions prior to 0.2.0.Can you improve this documentation? These fine people already did:
Jake McCrary, Anthony D'Ambrosio & Cameron DorratEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close