Matcha lets you write flexible, composable test assertions with human
friendly error messages. It's modeled after the excellent Java Hamcrest
library.
As a quick example, you might build up a matcher that says "this map has 5
elements, and the :foo key must be greater than 10" like so:
```
(require '[matcha :as m])
(deftest my-map-test
(m/is (m/and (m/has-entry-that :foo (m/< 10)) (m/has-count 5))
my-map))
```
If that ever returns false, you'll get an *excellently* readable error
message, detailing exactly why it failed.
Matcha is completely test framework independent, though it does ship with
clojure.test support out of the box. Wiring it up to your test framework of
choice should take only a few minutes.
Read more examples here <http://yellerapp.com/posts/2015-25-05-matcha.html>,
grab the code on github <https://github.com/yeller/matcha> or checkout the api
docs <http://yeller.github.io/matcha/doc/matcha.html>.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.