This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-02-17
Channels
- # admin-announcements (3)
- # announcements (1)
- # aws (3)
- # beginners (41)
- # boot (109)
- # braid-chat (2)
- # braveandtrue (5)
- # cider (11)
- # cljs-dev (38)
- # cljsjs (15)
- # cljsrn (5)
- # clojure (87)
- # clojure-berlin (16)
- # clojure-ireland (1)
- # clojure-japan (10)
- # clojure-madison (3)
- # clojure-nl (3)
- # clojure-poland (6)
- # clojure-russia (115)
- # clojure-sg (1)
- # clojurebridge (35)
- # clojured (8)
- # clojurescript (36)
- # core-async (24)
- # cursive (18)
- # datavis (1)
- # datomic (27)
- # dirac (22)
- # editors (1)
- # emacs (3)
- # events (19)
- # hoplon (149)
- # ldnclj (7)
- # lein-figwheel (1)
- # luminus (1)
- # off-topic (70)
- # om (196)
- # onyx (63)
- # parinfer (155)
- # proton (36)
- # re-frame (69)
- # reagent (2)
- # ring (2)
- # ring-swagger (1)
- # slack-help (4)
- # spacemacs (9)
- # testing (11)
@raymcdermott: in Clojure you can use the blocking version of take (`<!!`) to block for async results, and in CLJS use cljs.test.async
for asynchronous tests
you can see examples of both in this file https://github.com/funcool/cats/blob/master/test/cats/labs/channel_spec.cljc
@raymcdermott: You're welcome
I almost treat them like external dependencies in the same style as Dependency Injection
That makes testing easier, as you don't care who is suppling a channel, just that you can consume it.
@dialelo: pretty heavyweight abstractions - good though I didn’t know about that library and it looks really interesting
sure, that’s my approach in general anyway … so then you just tap off the inputs and test the channel logic and compare output?
I don't necessarily use tap
. All I mean is, if you have Subsystem T under test, and that it needs some channels as input arguments when it starts -- provide those arguments explicitly in the test. Subsystem T doesn't need to know whether those came from Subsystem A or some mock data on a channel.