Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Karma clear screen before running tests

I use karma to run jasmine specs. Every time a file changes the tests are run. This is awesome but it would be even better if the previous test output would be removed from the terminal.

Is there a way to clear the terminal before tests are run in karma?

like image 662
fernandohur Avatar asked Apr 02 '14 22:04

fernandohur


2 Answers

It is not supported. I like this idea though. I created issue #1004 to support this.

like image 115
Sylvain Avatar answered Oct 11 '22 12:10

Sylvain


The issue @Sylvain has created is still open, but there is a plugin karma-clear-screen-reporter which does the job. Internally it uses the magic:

console.log('\u001b[2J\u001b[0;0H');

Alternatively you can also place this at the top of your test runner code to clear the console yourself.

like image 26
bluenote10 Avatar answered Oct 11 '22 12:10

bluenote10