Fork me on GitHub
Tom H.06:10:02

Is it possible to use #dbg/#break with the calva test runner?

Tom H.06:10:40

I’m using “Calva: run current test” and it seems to be ignoring them

Tom H.07:10:07

Also I think ‘expected’ and ‘actual’ have been flipped, this is what I get when I run lein test:

Tom H.07:10:37

and this in calva output:

Tom H.08:10:10

last question 😅 should “Calva: Interrupt Running Evaluations” stop the test runner? It doesn’t seem to. Happy to add Github issues for any of these if that would help 🙂


@tomisme The test runner loads the current file when you "run current test" (and maybe the other test commands too) to make sure the latest version of the code is run. When the file is loaded, breakpoints are essentially removed. See here: So no, breakpoints will not be hit when running tests via the runner.


I think a note in the docs would be helpful about that.


That test output looks correct though, the expected is the first arg to the = function, so you expect status (`500`) to equal 403


Lein is saying you expected status to equal 403, but actually 500 (expected) does not equal 403


Flipping your args to = may read better. But the test reporter uses expected and actual as reported from cider-nrepl.


Also, regarding the breakpoints, you can eval the test form with breakpoint tags, then call it directly (avoiding a load file in between), and the breakpoint will be hit