boot-test
boot-test copied to clipboard
Running a single test from namespace
It would be nice to have support for running single tests also. Currently test
only takes whole namespace using -n
.
It has the -f
for filter, and takes an expression for filtering tests, but I'm not clearly understand how it can be used in a reasonable usable way.
I have own version of test task completelly based on this package but without humane-test-output and with new additional parameter for filter by name.
So that line:
boot test -f "(= (:name (mata %)) 'foobar)"
Can be used in this maner:
boot test -s foobar
You can found the code here: https://github.com/funcool/bootutils/blob/master/src/funcool/bootutils.clj#L72
PRs for -s
and a flag to turn on/off humane-test-output would be very welcome, these are great features.
I'll prepare these PR's in my first free time! ;)
Actually for running single tests one can do something like
boot test -n foo.bar -f '(re-find #"my-test" (str %))'
Which although powerful is kind of ugly. Something like boot test -t foo.bar/my-test
would be more than enough for practical purposes imo.
Can we make it simpler to type in?