This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-10-19
Channels
- # announcements (5)
- # babashka (13)
- # beginners (62)
- # calva (46)
- # cider (24)
- # clj-kondo (4)
- # clojure (12)
- # clojure-europe (21)
- # clojure-hungary (1)
- # clojure-nl (1)
- # clojure-norway (18)
- # clojure-uk (6)
- # clojuredesign-podcast (4)
- # clojurescript (9)
- # conjure (1)
- # core-async (5)
- # datomic (3)
- # emacs (1)
- # holy-lambda (14)
- # hyperfiddle (36)
- # jobs-discuss (3)
- # joyride (7)
- # lsp (35)
- # om-next (1)
- # pedestal (11)
- # podcasts-discuss (1)
- # practicalli (2)
- # releases (3)
- # sci (17)
- # shadow-cljs (5)
- # testing (4)
- # tools-deps (10)
- # vim (2)
- # xtdb (5)
Just a question about test doubles - I'm wondering if there's a convenient library for creating mock functions. Googling around this seems to lead to a lot of options that focus on redefining vars, but that's what I'm trying to avoid. Basically I'm looking for jest.fn
only in Clojure, which you could sort of use like:
(let [f (create-stub)]
(do-thing! f)
(is (= (call-count f) 1))
(is (= (args-for-call f 0) [:foo :bar])))
Obviously this is the sort of thing that one can write oneself, but if it's already out there, I'd like to borrow it ...yeah, that looks handy. Thanks!
I'd like announce https://github.com/danielmiladinov/burpless, a library I just released, for facilitating writing cucumber tests from Clojure