This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-02-18
Channels
- # announcements (5)
- # aws (4)
- # babashka (30)
- # beginners (90)
- # calva (31)
- # clj-on-windows (16)
- # clojure (110)
- # clojure-dev (10)
- # clojure-europe (26)
- # clojure-nl (1)
- # clojure-norway (20)
- # clojure-spec (25)
- # clojure-uk (15)
- # clojured (2)
- # clojurescript (12)
- # code-reviews (2)
- # community-development (3)
- # conjure (14)
- # datomic (15)
- # defnpodcast (2)
- # events (1)
- # fulcro (17)
- # graalvm (8)
- # gratitude (1)
- # introduce-yourself (2)
- # jobs-discuss (7)
- # kaocha (6)
- # lsp (9)
- # luminus (5)
- # nextjournal (7)
- # observability (9)
- # off-topic (71)
- # portal (5)
- # practicalli (1)
- # rdf (21)
- # re-frame (15)
- # releases (1)
- # shadow-cljs (24)
- # testing (7)
- # tools-build (13)
- # tools-deps (14)
- # xtdb (7)
Hi everyone! I’m looking to get into testing in clojure - coming from the ruby world I’m used to rspec and minitest. What would the equivalents be in clojure? Is there a library that is basically a de facto standard that most people use?
I've used rspec and clojure for a similar amount of years
I'd say practically everyone is on board with clojure.test
here, which is rawer than rspec but also very simple and stable.
One thing that tends to trip people up is that clojure.test/testing
blocks simply are for documentation purposes - they don't trigger fixtures or such.
https://github.com/clojure-expectations/clojure-test is interesting becase it's richer (like rspec) while still sticking to clojure.test which means it will work over many IDEs and test runners
I also recommend my own lib check
, if you want to use ClojureScript with async tests :)
If you want better matchers, expectations or nubank/matcher-combinators are great tools.
Thanks for the replies! clojure.test
it is then 🙂 Will also check clojure-expectations/clojure-test
@robin.saaf clojure.test
is built-in and all the tooling/editors support that. Coming from an Rspec world, you might find expectations.clojure.test
more to your liking -- https://github.com/clojure-expectations/clojure-test -- and it is compatible with clojure.test
so all the same tooling/editors work with it as well. At work we use a mixture of both of these libraries. There's an #expectations channel for deep dives on it but I'm happy to answer Qs about it here or there. (note: the "Classic" Expectations is not compatible with clojure.test
and has its own tooling/editor integrations, which is why I created the newer clojure.test
-compatible version)