This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-08-17
Channels
- # announcements (1)
- # babashka (21)
- # beginners (46)
- # calva (21)
- # cherry (10)
- # cider (5)
- # clojure (54)
- # clojure-europe (16)
- # clojure-nl (2)
- # clojure-norway (37)
- # clojure-spec (7)
- # clojure-uk (4)
- # clojurescript (30)
- # conjure (3)
- # cursive (1)
- # datalog (5)
- # datascript (3)
- # datomic (13)
- # emacs (5)
- # fulcro (82)
- # girouette (1)
- # helix (4)
- # hyperfiddle (2)
- # joyride (1)
- # juxt (1)
- # kaocha (4)
- # lambdaisland (3)
- # luminus (1)
- # malli (15)
- # off-topic (60)
- # pathom (3)
- # polylith (1)
- # practicalli (3)
- # releases (1)
- # ring (4)
- # sql (3)
- # squint (85)
Hi, I'm using http-kit with ring and reitit to make an api and I'd like to test my main handler. I've seen that clojure.test + ring-mock was a thing to do unit testing. Is there anything else to perform this?
Why are you looking for something else?
It is hard to answer. There are alternatives to clojure.test such as midje, but it is not clear what exactly you want to know?
In theory a ring handler is just an ordinary function, so you don’t need special tooling to test it. ring-mock
definitely helps as it is a bit tedious to generate request maps your self.
Oh, I just wanted to know if the following way of doing things was reasonable given the current state of the Clojure ecosystem (ring and http-kit related)
Yes, generating requests is a bit tedious, so this ring-mock is useful, but maybe there is some other nice tools I'm not aware of related to handler testing, etc.