jasongilman / proto-repl

A Clojure Development Environment package for the Atom editor
https://atom.io/packages/proto-repl
MIT License
565 stars 50 forks source link

Rerun previous test selection #317

Open gajwani opened 5 years ago

gajwani commented 5 years ago

I have previously used IntelliJ for a number of projects and while I prefer Proto-REPL with Atom for Clojure development, I'm missing a few parts of the standard workflow I had developed there.

The one that I miss the most is iterating on a test. For example: writing a test, and rerunning it over and over until I have written sufficient code to make it pass. For now, this is doable with the "run tests in namespace" command, but I still have to switch contexts from my code buffer, to the test buffer, despite not needing to make any edits.

Is there any way that rerunning the last set of tests could be added as a key mapping, that could be run from anywhere? For example, if the last run was an individual test, could I press something like Ctrl-Alt-, r to rerun the last test? Or if the last run was to run all in a namespace, could Ctrl-Alt-, r rerun the whole namespace, without me having to put my cursor at that point in the other buffer? I realize this probably requires some sort of state to be added, but hopefully that is not the issue here (looking at the coffeescript, it seems like a variable that remembers the test run command could be added).

If this is already somehow built in, and I have simply missed it, my apologies. I'm new to the Clojure world and I don't know if this can be easily replicated using some other mechanism.

Thanks!

P.S. I will try and build what I think this might look like into a PR , although I'm also new to Atom plugin development, so it might take me a while to get everything set up. If anyone can add this trivially, I'll gladly defer to them.