This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-08-03
Channels
- # bangalore-clj (1)
- # beginners (104)
- # boot (30)
- # braveandtrue (1)
- # cider (6)
- # cljs-dev (95)
- # cljsjs (16)
- # cljsrn (3)
- # clojure (106)
- # clojure-italy (15)
- # clojure-nl (2)
- # clojure-norway (3)
- # clojure-russia (1)
- # clojure-spec (40)
- # clojure-uk (53)
- # clojure-ukraine (1)
- # clojurescript (200)
- # code-reviews (2)
- # cursive (1)
- # datascript (3)
- # datomic (32)
- # editors (28)
- # gorilla (6)
- # graphql (8)
- # hoplon (1)
- # jobs (8)
- # jobs-discuss (5)
- # jobs-rus (1)
- # keechma (13)
- # leiningen (5)
- # luminus (3)
- # lumo (53)
- # off-topic (5)
- # om (5)
- # om-next (1)
- # onyx (56)
- # parinfer (7)
- # protorepl (22)
- # re-frame (47)
- # reagent (37)
- # remote-jobs (1)
- # ring-swagger (9)
- # specter (7)
- # vim (14)
- # yada (30)
Do Lein test selectors have access to other test selectors? Or only to test metadata?
I happen to several different classes of tests (e.g. ^:app-1
and ^:app-2
), as well as a differentiation between types of tests (`^:integration` vs. not).
The following seems a bit repetitive:
:test-selectors {:app-1-unit #(and (:app-1 %)
(not (:integration %)))
:app-1-integration #(and (:app-1 %)
(:integration %))
:app-1 :app-1
:app-2-unit #(and (:app-2 %)
(not (:integration %)))
...}
Seems like it’d be more composable if test selectors can refer to each other.Hi, can anybody share a tip on how to execute some project initialization code when I run lein test
? I need to load some config and initialize state before running tests but only once for the project, not in every test namespace. Does Leiningen have any hooks for this?
Environment variables can be set with environ
and its Lein plugin, lein-environ
: https://github.com/weavejester/environ
You can then have a config.edn
file in the project that references those environment variables.
I also like aero
for auto type casting and composing values: https://github.com/juxt/aero
Thanks, but I am actually looking for a way to NOT put the initialization trigger in every test namespace, but rather as a Leiningen hook or something
I already have the config/init stuff sorted, I just need to decouple that from every test namespace