This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-01-05
Channels
- # admin-announcements (183)
- # aws (30)
- # beginners (22)
- # boot (301)
- # cider (19)
- # cljs-dev (3)
- # cljsrn (23)
- # clojars (15)
- # clojure (136)
- # clojure-italy (8)
- # clojure-nl (4)
- # clojure-russia (19)
- # clojured (10)
- # clojurescript (134)
- # component (48)
- # cursive (7)
- # datavis (4)
- # datomic (50)
- # devcards (6)
- # events (9)
- # jobs (1)
- # ldnclj (10)
- # lein-figwheel (19)
- # leiningen (1)
- # luminus (16)
- # off-topic (5)
- # om (151)
- # proton (60)
- # re-frame (10)
- # reagent (25)
- # remote-jobs (1)
- # slack-help (3)
- # spacemacs (1)
- # vim (1)
instead of running
lein cucumber
to run all tests, how can I run a single feature test?i don’t know about cucumber, but normal clj tests you can do: lein test ns-of-test.test
@frankk38506: been a long time (over 12 months) since I used lein-cucumber but I think you have to put a tag against the single feature you want to test and then pass the tag in a command line option e.g. if tag is @wip
then lein cucumber --tags @wip
But this is all from memory!
I found lein-cucumber deeply annoying and ended up using https://github.com/xeqi/kerodon for my use cases alhtough they're not synonymous
@roberto: no - that's why I ditched it. It's really difficult to incorporate in the repl workflow
Having said that kerodon is only useful if your testing html served from ring.
I think there's a big hole in the automated browser based testing story for Clojure/Clojurescript although I know most would say, test the API's extensively and the browser interaction less frequently.
It's a new collection
user=> (def col {:id 1 :name "Jane Doe" :images []})
#'user/col
user=> (assoc col :images [{:count 3 :monitor 12}])
{:id 1, :name "Jane Doe", :images [{:count 3, :monitor 12}]}
Actually, you’d probably rather use (update col :images conj {:count 3 :monitor 12})
. I assume since :images
is a vector, it’s going to have a number of entities.
@jcomplex: the take away is that by default assoc
and update
will return a new map with the changes. (and conj
returns a new sequence - a vector in this case)
therefore your original map would be unchanged
This is strange at first when you've come from a language that mutates values in place but after a while you just get used to passing new values up and down a chain of functions.