Debugging Clojure expectations

101 Views Asked by At

Currently, I have Intellij + Cursive setup for Clojure development. I have my tests written using expectations library

https://github.com/clojure-expectations/expectations

With this setup, the debug process that I follow is putting logs and then running the whole tests. Is there a way to put breakpoints in IDE, and debug the tests? Cursive seems to be only supporting clojure.test currently.

Does anyone have any suggestions on IDE setup or debugging process for clojure expectations ?

1

There are 1 best solutions below

0
On

Use https://github.com/clojure-expectations/clojure-test instead of the bare Expectations library. This brings all of the Expectations syntax into a clojure.test environment, with the caveat that you have to name your tests (expectations) using defexpect -- because a lot of the clojure.test-compatible tooling relies on test functions having predictable names. This should work with Cursive (I worked with Colin Fleming to test this when I first started writing the clojure.test version of Expectations).