xeqi/kerodon

facilitate using kerodon with test frameworks other than clojure.test

Closed this issue · 2 comments

I'd like to use kerodon from a test framework other than clojure.test. It'd be nice to have functions similar to text?, status?, value? etc which simply returned the text, status, or value of the node. That way, I could make my assertions using whatever assertion/test library I want.

For example, using speclj, I would want to be able to write

(should= (attr session [:form] :id) "my-form")

or using midje,

((attr session [:form] :id) => "my-form")
xeqi commented

I think this is a good idea. I'm going to have some time opening in May, and can look at making better helpers then.

It's possible to use the kerodon.core namespace and write your own status?, etc. functions that work for your testing library; but yes, it'd be nice to make this more generic to allow for use with speclj, midje, and so on.