conjure icon indicating copy to clipboard operation
conjure copied to clipboard

How to always prefer `-test` namespace?

Open Invertisment opened this issue 1 year ago • 1 comments

I found that when you press ,tn then you run current ns tests. And when you press ,tN and you reside in normal buffer then you run the test namespace's tests. But why do you want to run non-test namespace's tests when you are located in test buffer? Can we have a keybind that would always run test buffer's tests no matter which one you are?

i.e. Can we have ,tN without this subsctring string (line 498): https://github.com/Olical/conjure/blob/253a2a921597531f4a2147b089191cca2c05e3f2/fnl/conjure/client/clojure/nrepl/action.fnl#L494-L499 https://github.com/Olical/conjure/blob/253a2a921597531f4a2147b089191cca2c05e3f2/fnl/conjure/client/clojure/nrepl/action.fnl#L498

Invertisment avatar Aug 05 '22 07:08 Invertisment

IMO it would be a better default. I added it to my own plug-in. Maybe somebody could use it. https://github.com/Invertisment/conjure-additions/blob/master/fnl/conjure-additions/additional-fns.fnl#L9

Invertisment avatar Aug 06 '22 06:08 Invertisment

Sorry, super slow on this but I agree! Added to develop. If someone reaaaaly wants the old behaviour (I doubt that workflow exists, but I'm prepared to be surprised) then I could add it back behind an option. I'd like to avoid more options where possible though and I think this default makes sense.

Could also argue <prefix>tn should have this behaviour of always running the -test suffix version of your current ns and <prefix>tN is FORCING Conjure to test whatever file you're looking at right now.

Olical avatar Oct 08 '22 11:10 Olical

But maybe that mapping swap should be something left up to users.

Olical avatar Oct 08 '22 11:10 Olical