Fork me on GitHub
#cursive
<
2016-04-20
>
lsenta18:04:18

@cfleming: Thanks for the answer on my 'autocomplete from the REPL' question

lsenta18:04:50

I have another one, I write a lot of tests, and Cursive is pretty good on showing where things go awry

lsenta18:04:22

It doesn't show the tests properly when they happen in a function (the is in the function gets green'd but not the call in the deftest)

lsenta18:04:57

I worked around it by using macros instead of functions, that worked until I got exceptions.

lsenta18:04:32

It looks like if I run:

(deftest T
   ...
   (is (some-code-that-may-throw))
   ...)

lsenta18:04:03

The error will bubble up to the deftest, I lose all the information about where the issue happened. It makes complex tests a pain to debug.

lsenta18:04:11

It looks like the (do-report {:type :error ...}) in the is macro, messes up Cursive test marking, is it intended?

cfleming21:04:49

@lsenta: You’re looking for https://github.com/cursive-ide/cursive/issues/823 - I have it about half implemented, it won’t be in the next release but probably the one after that.

lsenta21:04:06

That part I solved with macros @cfleming

lsenta21:04:53

My issue is that when an exception is triggered in an is, doing (is (exists? "some selenium end-to-end testing selector")) for example, the gutter won't show the line

lsenta21:04:04

Instead the whole test will be red and the exception will be shown in the deftest

lsenta21:04:00

I rewrote is to do-report a type :fail instead of type :error and it behave in a more useful way