This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-09-08
Channels
- # architecture (8)
- # aws (25)
- # babashka (9)
- # beginners (57)
- # calva (16)
- # cider (16)
- # clj-kondo (3)
- # cljdoc (13)
- # cljsrn (6)
- # clojure (272)
- # clojure-europe (36)
- # clojure-losangeles (1)
- # clojure-nl (8)
- # clojure-poland (3)
- # clojure-spec (4)
- # clojure-uk (8)
- # clojuredesign-podcast (9)
- # clojurescript (92)
- # code-reviews (1)
- # conjure (8)
- # core-async (1)
- # cursive (13)
- # datalog (1)
- # datascript (35)
- # datomic (76)
- # duct (10)
- # emacs (5)
- # events (7)
- # figwheel-main (1)
- # fulcro (35)
- # graalvm (20)
- # graphql (6)
- # jobs (3)
- # klipse (1)
- # london-clojurians (1)
- # malli (3)
- # off-topic (223)
- # pathom (2)
- # pedestal (13)
- # portal (1)
- # reitit (6)
- # remote-jobs (1)
- # shadow-cljs (21)
- # specter (2)
- # sql (63)
- # tools-deps (85)
- # tree-sitter (4)
- # xtdb (6)
Hi all! I usually add a https://gist.github.com/athomasoriginal/72119cf7fad645c4844bae866863d2b9#file-clj-L17 to improve my debug experience in cljs. I thought it would be an interesting exercise to write a test for the debug macro as well. https://gist.github.com/athomasoriginal/72119cf7fad645c4844bae866863d2b9. If anyone has any feedback that would be great! For example
• I’m manually setting the console.log
- maybe there is another way to do this?
• Maybe the approach to testing this in general is flawed? (the idea for stubbing the console.log
came from the with-log
macro in clojure.tools.logging which I thought was pretty cool so as to not flood your tests /log files with logs)
• What’s a good way of handling a macro where you need to access something stateful? (in this case I used an atom which we pass in)
Thanks in advance!!