mocha.el
mocha.el copied to clipboard
Keeping compilation buffer alive and implementing (mocha-run-last)
Hi friends,
I first decided to peep at mocha.el code when I found myself tired of seeing its compilation window jumping from one side to another. Maybe I missed something but I don't know why the mocha buffer was killed for each run. So I changed that and my life is easier !
And from there it was so easy to implement this (mocha-run-last) , so handy when you're working on the tested code (ref #16).
I hope you'll like it. Cask is happy.
This looks solid. Sorry for taking a while to get back, I have not had any time for this project and have not been using emacs or mocha lately.
I'd like to test the code locally before merging, so I will really try to do that tonight or tomorrow.
Do you think you could add a scenario to the integration tests that does something like the following:
- Tests a particular line and get a single passing test
- re-run the tests with your new command and verify we get the same result
- test the whole file and verify we get a different result (1 passing, 1 failing)
you can see similar tests here: https://github.com/scottaj/mocha.el/blob/master/features/test-project.feature
I think you can obtain this same behavior by using the built-in recompile
command. Unless I'm missing something else, you can get the same results with:
(defalias 'mocha-run-last #'recompile)
I think this PR should be related to #52 and #59 .
This one may have seemed wordy, as it I was carefully explaining each change for collaborators. But it may also cover more about buffers (old #16, #33) and was my base for further work about test debugging (#15 from scottaj)
@Alhadis Congrats !
complements :
- https://github.com/RockyRoad29/mocha.el/tree/mocha-debug
- https://github.com/RockyRoad29/mocha.el/wiki/Mocha-in-emacs