-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
selectors for tests #28
Comments
any plans on this? |
Hi, i found that i can emulate such feature by using "filters" configuration option. (deftask integration-test
"Runs integration tests"
[]
(comp (environ :env
{:http-port "9000"
:database-url "jdbc:postgresql://localhost:32768/test?user=postgres&password=postgres"})
(test :filters #{'(-> % (meta) (:integration))}))) That interesting, now i am not sure should this functionality be in core or not. Because it is so easy to implement different strategies of what tests/namespaces you want to run tests on. |
I think the filters option actually filters functions, not namespaces. I was just trying to use it to exclude namespaces and while debugging noticed that it gets evaluated for every symbol in every namespace. Returning false doesn't stop the evaluation, and even if you return false for every symbol in a namespace it still prints "Testing namespace.foo". Perhaps the documentation should be improved to make it clear that this doesn't filter namespaces, but rather functions? |
From
lein help test
:It would be nice to have a
:test-selector
parameter inboot test
as well (it allows filtering namespaces at the moment, but not individual tests as far as I know).The text was updated successfully, but these errors were encountered: