-
Notifications
You must be signed in to change notification settings - Fork 40
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
Support for selectors in the repl? #64
Comments
What sort of filtering logic would be moved? Current you can insert a filter directly at the REPL: (->> (find-tests "test") (filter whatever?) (run-tests)) I believe you can also use |
Oh, I hadn't realised it was that simple - I glanced at the code in https://github.com/weavejester/eftest/blob/master/lein-eftest/src/leiningen/eftest.clj#L24 and my eyes wen't fuzzy 😄 |
Ok, I ended up doing something like this, which feels a little bit wordy. (as-> (find-tests "test") ts
(filter (complement (comp :integration meta)) ts)
(run-tests ts {:multithread? false})) There are probably better ways to shuffle the arguments around, but my clojure is a bit rusty. I'm not sure if putting this into the lib itself would be a big improvement, or where it would go if it was attempted. (edit: I should add that at the moment I'm using this via a local profile, and not adding anything into the project for its other contributors, if we decide to all use it I could add a simple wrapper fn easily enough) |
I'm tentatively of the opinion that a function like this could be added to your development environment. Perhaps something like: (ns user
(:require [eftest.runner :as ef]))
(defn run-tests []
(as-> (ef/find-tests "test") ts
(filter (complement (comp :integration meta)) ts)
(ef/run-tests ts {:multithread? false})) You could also play around with a wrapper that accepts a transducer. |
I would quite like to run all tests, excluding some integration tests from the repl.
At the moment it looks like all of the selector logic is in the lein plugin. Would it be possible to move the filtering logic into the repl side, even if the selector configuration needs to stay in the plugin?
(also: thanks for making this, it's great!)
The text was updated successfully, but these errors were encountered: