This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-09-13
Channels
- # aleph (3)
- # aws (1)
- # beginners (97)
- # boot (41)
- # cider (7)
- # clara (105)
- # cljs-dev (4)
- # cljsrn (66)
- # clojure (185)
- # clojure-argentina (2)
- # clojure-colombia (15)
- # clojure-czech (1)
- # clojure-dusseldorf (8)
- # clojure-greece (2)
- # clojure-italy (5)
- # clojure-russia (33)
- # clojure-spec (14)
- # clojure-uk (9)
- # clojurescript (75)
- # cursive (6)
- # data-science (1)
- # datomic (12)
- # emacs (2)
- # fulcro (71)
- # funcool (1)
- # jobs (6)
- # jobs-discuss (62)
- # juxt (21)
- # lein-figwheel (1)
- # luminus (9)
- # lumo (41)
- # off-topic (39)
- # om (12)
- # onyx (1)
- # portkey (2)
- # protorepl (4)
- # re-frame (14)
- # reagent (50)
- # ring (3)
- # shadow-cljs (6)
- # spacemacs (38)
- # specter (8)
- # test-check (14)
- # testing (52)
- # unrepl (2)
how would i put together a spec for a map with string keys and values that are vectors of strings?
(s/map-of string? (s/coll-of string? :kind vector?))
is (spec/map-of string? (spec/+ string?))
ok?
I would recommend coll-of in this case
it gives you more control over size constraints, generation, etc and is a better match for what you described
ok cool
s/+ is for describing sequential collections with internal structure along with the other regex ops. while what you have will work, you’re not really using any of those features
thanks
no doubt this has been asked 1k times, but it's probably evolving. what are people currently doing to turn on instrumentation for their test run? top of the file in test_helpers.clj that's required by every test, fixture that's used by every test?
once fixture seems like a good place for that
@bfabry we’re using :once fixtures,
works ok, unless you forget to use the fixture 😕