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.
- Upgrades
org.clojure/tools.namespace
dependency to1.1.0
. - Introduces dependencies on
org.clojure/tools.cli
.
- Fixes bug that caused
^:test-refresh/focus
to no longer focus.
- BREAKING No longer quits when reaching the end of STDIN stream. This will cause behavior of ctrl-d behavior to change (it will no longer quit). This was done to work around STDIN closing if test-refresh invoked an external process that causes specific version of bash to be invoked.
- Allow default focus flag,
:test-refresh/focus
, to be overridden by specifying:focus-flag
key value pair in test-refresh configuration. - More details are printed to screen when there is an exception reloading your code.
- Added
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.
- Adds support for impromptu test selecting by adding
: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))))
- EXPERIMENTAL Detects if circleci.test runner is in project and uses that instead of clojure.test
- Preemptively adds support for Leiningen 2.8.0 support for string as dependency name.
- Drops support for Leiningen 1. Leiningen 1 users can use version
0.20.0
- Fixes issue with Leiningen's managed dependencies from issue #60.
- Merges in Leiningen's
: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.
- Fixes bug introduced by previous change that resulted in a stackoverflow exception.
- Adds optional
:stack-trace-depth
flag to configuration. Value is bound toclojure.test/*stack-trace-depth*
.
- Adds optional
: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).
- Adds optional
:watch-dirs
flag to specify what directories to monitor for changes.
- Better handles when
org.clojure/tools.namespace
throws an exception parsing a namespace declaration.
- Can now use the
:with-repl
flag to start a REPL for interacting with your project. More details in README.md and this pull request.
- Adds support for running tests once with the flag
:run-once
.
- Adds support for only running tests in changed namespaces by setting
the
:changes-only
flag in your configuration or at the command line. See sample.project.clj for details.
- Adds support for specifying a custom test reporter. See
sample.project.clj and
lein2
directory for example.
- Upgrades
org.clojure/tools.namespace
to 0.2.11. This improves cljc support.
lein-test-refresh
can suppressclojure.test
's Testing namespace output. Very useful on projects with a large number of test namespaces for keeping the terminal useful.
- Upgrade
org.clojure/tools.namespace
dependency to 0.2.10.
lein-test-refresh
releases no longer have a Clojure dependency.- No longer explicitly adds tools.namespace dependency.
- Fixtures associated with tests in ignore namespaces no longer run. Thanks lbradstreet!
- Upgrade to
org.clojure/tools.namespace
0.2.8.
- Upgrade to
org.clojure/tools.namespace
0.2.7.
lein test-refresh
now includes the:test
profile. (same behavior aslein test
)
- Upgrade to
org.clojure/tools.namespace
0.2.6. - Upgrade to
leinjacker
0.4.2
- test-refresh quits when ctrl+d pressed.
- Failed tests are run first. If they pass then all of your tests are run.
- Prints how long tests took to run to console.
- Fixes bug where
lein-test-refresh
continuously polled filesystem for changes.
- First cut of supporting a subset of leiningen test-selectors.
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
.
- Can specify
:test-refresh {:notify-on-success false}
inproject.clj
or.lein/profiles.clj
to disable notifications and growl alerts if all tests pass.
- Can specify
:test-refresh {:growl true}
inproject.clj
or.lein/profiles.clj
to turn on growl notifications.
- Nothing. This was an accidental release due to testing the release script.
- Change success message to 'Passed all tests'
- Bug fix for language around number of failing assertions.
- If
: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.
- Hitting enter causes tests to be run.
- Adds support for reporting test results using Growl. Use
lein autoexpect :growl
- Upgrade to
org.clojure/tools.namespace 0.2.1
. This version of tools.namespace provides better backwards compatibility with versions prior to 0.2.0.