Skip to content

Commit

Permalink
Clear scrollback on terminal clear in watch mode (#2230)
Browse files Browse the repository at this point in the history
* Send reset screen symbol instead of clear

* Use other symbol for clearing terminal on Windows

* Clear remaining screen on linux/os x
  • Loading branch information
ColCh authored and cpojer committed Dec 8, 2016
1 parent 4ce6c30 commit 56a39af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/jest-cli/src/jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const sane = require('sane');
const which = require('which');
const TestWatcher = require('./TestWatcher');

const CLEAR = '\x1B[2J\x1B[H';
const CLEAR = process.platform === 'win32' ? '\x1Bc' : '\x1B[2J\x1B[3J\x1B[H';
const VERSION = require('../package.json').version;
const WATCHER_DEBOUNCE = 200;
const WATCHMAN_BIN = 'watchman';
Expand Down

0 comments on commit 56a39af

Please sign in to comment.