mocha.el icon indicating copy to clipboard operation
mocha.el copied to clipboard

Keeping compilation buffer alive and implementing (mocha-run-last)

Open RockyRoad29 opened this issue 7 years ago • 4 comments

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.

RockyRoad29 avatar Nov 29 '16 19:11 RockyRoad29

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:

  1. Tests a particular line and get a single passing test
  2. re-run the tests with your new command and verify we get the same result
  3. 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

scottaj avatar Dec 12 '16 17:12 scottaj

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)

felipeochoa avatar Aug 10 '17 13:08 felipeochoa

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 !

RockyRoad29 avatar Jun 06 '21 12:06 RockyRoad29

complements :

  • https://github.com/RockyRoad29/mocha.el/tree/mocha-debug
  • https://github.com/RockyRoad29/mocha.el/wiki/Mocha-in-emacs

RockyRoad29 avatar Jun 06 '21 12:06 RockyRoad29