-
Notifications
You must be signed in to change notification settings - Fork 10
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
REPL+CLI support #44
REPL+CLI support #44
Conversation
Oh, I didn't remember bat-test didn't have a main ns at all for Clojure CLI yet. Is :exec-fn prefered over ns -main function now? I'll want to ensure the lein version works as close as possible as this, so it would make sense to implement test-matcher-directories in the impl ns so it can be shared by both frontends. |
It's hard to tell exactly, but Cognitect's test-runner seems to be encouraging exec. https://github.com/cognitect-labs/test-runner
Will do. |
Looking into providing a kv interface via Lein, eg., |
My implementation of Leiningen test selectors is wrong, I need to go back to the drawing board. |
I added a separator for
I really like this interface, saves a lot of typing. I'll try and port it to Clojure CLI with |
Hi, what is the status now? I see some problems with the Lein implementation, as the Lein namespace is using cli namespace directly, which requires c.t.namespace, which probably isn't available on Lein boot classpath. I can probably fix those problems if the cli interface and the selectors work with Lein otherwise. |
@Deraen I was thinking of one extra feature, but was having trouble implementing it. I think this PR is good enough to start with though, if you could fix the dependency issues for me that would be great. Then it's good to merge. Here's the idea for an extra feature:
You could then alternatively do |
@frenchy64 I tried fixing the Another problem is that the bat-test artifact is currently supposed to be used as a Lein or Boot plugin so that it won't have any dependencies and instead depends on the tool to add the dependencies vs. clj. What would you think about just taking the CLI part and releasing that as a new project? I believe using the main namespace with Lein is becoming a popular way to support multiple tools (e.g., Kaocha and Figwheel-main). |
Thanks for trying, I have no problem with making a new project! |
Close #21
Close #31
This exposes most of
bat-test
via the REPL or Clojure CLI.There is an extra feature called
:test-matcher-directories
which only runs tests in particular directories. This is especially useful for huge projects that are split into many source directories, so you can easily boot up a watching tester for a subproject.It's implemented as a sugar for
:test-matcher
.The Actions build can be seen passing here.