Fork me on GitHub
#spacemacs
<
2018-04-24
>
Bravi10:04:50

hi everyone. whenever i use , t a (run all tests) in spacemacs, most times it doesn’t ‘refresh’ the code. meaning it can’t resolve the newly added functions for example and then I have to quit and re-`jack-in` cider again. is there a work around to fix this?

jeff.terrell12:04:46

@bravilogy - I think there's a "refresh" function bound somewhere under ,, either in clojure-mode or cider-mode. You could try that before , t a to see if it picks up your newly added functions etc. I'm just guessing here, though, because I haven't used , t a before.

Bravi12:04:46

I sort of solved it by re-evaluating the buffer every time and + I’ve set it to automatically run tests whenever a namespace is loaded, which re-runs tests every time I re-evaluate the code

Bravi12:04:00

I guess it explicitly needs that re-evaluation

jeff.terrell12:04:02

Cool, glad you figured it out!

Bravi12:04:45

hah cheers 😄 , t a is actually quite convenient

Bravi12:04:12

and then you can use , T t to toggle auto test mode

Bravi12:04:39

after which you can just , e b and it will automatically run tests every time

jeff.terrell13:04:21

That's really nice. I'll have to try that out the next time. I'm used to doing lein test-refresh for autotesting. One of these days I need to just read the cider manual; I feel like I'm missing out on lots of good stuff.

ag16:04:58

I wish cider-test- functions had Clojurescript support. I mean I wish in general CIDER had better support of Cljs

12