This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-29
Channels
- # aws (3)
- # beginners (160)
- # boot (2)
- # bristol-clojurians (3)
- # cider (62)
- # cljs-dev (77)
- # cljsrn (15)
- # clojure (147)
- # clojure-brasil (10)
- # clojure-dusseldorf (2)
- # clojure-gamedev (1)
- # clojure-italy (128)
- # clojure-russia (1)
- # clojure-spec (19)
- # clojure-uk (34)
- # clojurescript (408)
- # code-reviews (2)
- # component (1)
- # core-async (56)
- # cursive (1)
- # datascript (1)
- # datomic (81)
- # emacs (11)
- # fulcro (39)
- # java (16)
- # jobs (3)
- # lein-figwheel (2)
- # leiningen (6)
- # lumo (89)
- # off-topic (11)
- # om (2)
- # om-next (1)
- # onyx (17)
- # parinfer (4)
- # pedestal (3)
- # perun (1)
- # quil (3)
- # re-frame (19)
- # reagent (8)
- # reitit (5)
- # remote-jobs (5)
- # shadow-cljs (145)
- # spacemacs (1)
- # sql (7)
- # test-check (15)
- # uncomplicate (1)
- # unrepl (122)
- # vim (2)
- # yada (4)
How do I test each individual branch (reitit/ring)? For example I have def app (ring/ring-handler (ring/router ["/api" branch1 branch2 branch3]))
each branch are just clojure vectors as reitit routes. In my test for branchN do I have to require [app] then test from the top down to that route OR do I create a ring-handler within my test for those routes and test that handler?
@grierson we test all routes via the whole application. Usually there is data & middleware attached to the top-level and they would not be in place if the sub-routes were tested separately. Actually, I think we mostly against a live server. e.g. a fixture sets up the system using a random http-port and we ram in real requests. This tests the JSON/Transit/EDN encoders & decoders too.