This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-02
Channels
- # adventofcode (6)
- # announcements (6)
- # babashka (21)
- # babashka-sci-dev (18)
- # biff (6)
- # clara (4)
- # clj-commons (2)
- # clj-kondo (7)
- # cljdoc (4)
- # clojure (9)
- # clojure-berlin (8)
- # clojure-europe (23)
- # clojure-gamedev (3)
- # clojure-indonesia (1)
- # clojure-nl (1)
- # clojure-norway (10)
- # clojure-poland (1)
- # clojurescript (27)
- # community-development (1)
- # conjure (32)
- # etaoin (6)
- # events (20)
- # fulcro (5)
- # graalvm (1)
- # helix (19)
- # hyperfiddle (14)
- # introduce-yourself (2)
- # music (1)
- # nbb (24)
- # off-topic (37)
- # pathom (2)
- # polylith (14)
- # reagent (11)
- # releases (1)
- # remote-jobs (1)
- # reveal (22)
- # shadow-cljs (16)
- # sql (3)
- # squint (11)
- # test-check (2)
- # xtdb (36)
Hello everyone. I'd like to announce a brand new tiny library that fixes a personal pain point.
https://github.com/camsaul/humane-are
I've been using some version of this or another for a while now; I thought it was finally time to spin it out into a separate library, in case anyone else found it useful.
I love clojure.test/are
, but I've generally avoided it for two reasons:
1. Failing assertions give no indication as to which set of arguments failed if you're using anything that pretty prints test output, such as https://github.com/pjstadig/humane-test-output, https://github.com/clojure-emacs/cider, or https://github.com/weavejester/eftest
2. are
lets you shoot yourself in the foot by writing expressions that include is
or testing
, and wraps them in another is
without complaining
Humane Are solves those problems. Try it out and let me know what you think!
This is cool. clojure.test
can be pretty frustrating and quite limited. I will take this opportunity to promote Expectations:
seanc@Sean-win-11-laptop:~/clojure$ clj -Sdeps '{:deps {com.github.seancorfield/expectations {:mvn/version "RELEASE"}}}'
Downloading: com/github/seancorfield/expectations/maven-metadata.xml from clojars
Clojure 1.11.1
user=> (require '[expectations.clojure.test :refer :all])
nil
user=> (expect even? (from-each [n (range 20)] n))
FAIL in () (NO_SOURCE_FILE:1)
n
expected: (=? even? n)
actual: (not (even? 1))
FAIL in () (NO_SOURCE_FILE:1)
n
expected: (=? even? n)
actual: (not (even? 3))
FAIL in () (NO_SOURCE_FILE:1)
n
expected: (=? even? n)
actual: (not (even? 5))
Completely clojure.test
-compatible in terms of tooling but a lot more expressive.Also, I find giant are
blocks a pain when you want to isolate one case to work on in the REPL
I wonder if this could be upstreamed.
https://clojars.org/clj-commons/clj-yaml is released with a bump of snakeyaml to 1.31. This fixes https://github.com/advisories/GHSA-3mc7-4q67-w48m. Thanks to @tscrowley for the PR!
