Skip to content

Commit 56a39af

Browse files
ColChcpojer
authored andcommitted
Clear scrollback on terminal clear in watch mode (#2230)
* Send reset screen symbol instead of clear * Use other symbol for clearing terminal on Windows * Clear remaining screen on linux/os x
1 parent 4ce6c30 commit 56a39af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/jest-cli/src/jest.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const sane = require('sane');
3434
const which = require('which');
3535
const TestWatcher = require('./TestWatcher');
3636

37-
const CLEAR = '\x1B[2J\x1B[H';
37+
const CLEAR = process.platform === 'win32' ? '\x1Bc' : '\x1B[2J\x1B[3J\x1B[H';
3838
const VERSION = require('../package.json').version;
3939
const WATCHER_DEBOUNCE = 200;
4040
const WATCHMAN_BIN = 'watchman';

0 commit comments

Comments
 (0)