circleci.test/dir doesn't run any test when not using selectors
Closed this issue · 3 comments
I added circleci.test to my project and I'm trying to run tests using the following alias, exactly as suggested in the README: "test" ["run" "-m" "circleci.test/dir" :project/test-paths]
. No tests are being run, even though the test nses are found and reported to the console like "Testing some.namespace". I get Ran 0 tests containing 0 assertions.
in the console, while I'd get Ran 14 tests containing 37 assertions.
when running with lein's original test command.
This behavior can also be verified on circleci.test own test suite, by running lein test
one can see the following output:
[...]
Ran 0 tests containing 75 assertions.
(the 75 assertions come from the namespace which has a test-ns-hook
defined so it doesn't care about selectors)
Looking into the code it seems like the issue is that when no selector is passed to test/dir
it uses :default
as selector, but it doesn't call lookup-selector
on it like -main
does (through read-args
) so it'd would only run tests which have a :default
meta entry with truthy value. Still when passing a selector it seems like it should call lookup-selector
so the actual selector gets picked up.
Thanks for catching this! I had a TODO
stashed regarding looking into why this was happening, but it looks like you found the root cause. =) Pushed a fix.
Happy to help! Looking forward to a bright future for this runner! :)
You stumbled across it a bit before I'd consider it ready, but once #4 is finished I hope to make a wider announcement and a stable release.