The expectations library takes the ideas of clojure.test and pushes them further with the goals of simplified test definition and improved feedback. In expectations, every test is a bare form with a single assertion.
For example, rewriting our first clojure.test examples with expectations looks like this:
(expect '(0 1 2 3 4) (range 5))
(expect '() (range 0))
Each expect at the top-level of the namespace takes an expected value and an expression and checks that the expectation is satisfied.
A number of other special expectations forms test various special cases. For example, passing an exception type will check that the form throws that type: