question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

add an option to clear console when using autoWatch:true

See original GitHub issue

This is based on http://stackoverflow.com/questions/22824255/karma-clear-screen-after-running-tests.

Simply adding this in watcher.js at line 91, makes this work (at least on windows). All that is left to do is add the options to the config and pass them to watcher.

var util = require('util');
util.print("\u001b[2J\u001b[0;0H");

Is this something we want to add? I think it’s useful.

Maybe we should instead support a beforeRun script that people could use to do that instead.

A workaround is to create a clear-screen-reporter that just overrides this.onRunStart and does

this.onRunStart = function() {
   console.log("\u001b[2J\u001b[0;0H");
};

Issue Analytics

  • State:open
  • Created 9 years ago
  • Reactions:6
  • Comments:21 (5 by maintainers)

github_iconTop GitHub Comments

14reactions
damianofcommented, Aug 17, 2017

Should add this feature

7reactions
mgolcommented, Oct 31, 2016

@dignifiedquire Why close? It seems to be a very useful feature request.

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - How to clear the console? - Stack Overflow
You can use following code to clear command line console: public static void ...
Read more >
console.clear() - Web APIs - MDN Web Docs
The console.clear() method clears the console if the console allows it. A graphical console, like those running on browsers, will allow it; ...
Read more >
How do I clear the screen in Terminal (no CLS)
For *nix-based systems like macOS, use the command clear. If you're using the built-in Terminal app: Edit > Clear Scrollback ⌥⌘K (Alt+Cmd+K).
Read more >
How to clear console in C language? - GeeksforGeeks
program to clear console screen in C using clrscr() function. ... in the upper right corner of the console screen. and e [2J...
Read more >
How to clear console in C? - Tutorialspoint
There are several methods to clear the console or output screen and one ... Let's say we have “new.txt” file with the following...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found