From f052867dc83c123fddbeb8a1162f9bb24040095c Mon Sep 17 00:00:00 2001 From: ColCh Date: Tue, 6 Dec 2016 10:37:04 +0300 Subject: [PATCH 1/3] Send reset screen symbol instead of clear --- packages/jest-cli/src/jest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/jest-cli/src/jest.js b/packages/jest-cli/src/jest.js index 1e43d5f12fab..ba6966990db7 100644 --- a/packages/jest-cli/src/jest.js +++ b/packages/jest-cli/src/jest.js @@ -34,7 +34,7 @@ const sane = require('sane'); const which = require('which'); const TestWatcher = require('./TestWatcher'); -const CLEAR = '\x1B[2J\x1B[H'; +const CLEAR = '\x1B[3J\x1B[H'; const VERSION = require('../package.json').version; const WATCHER_DEBOUNCE = 200; const WATCHMAN_BIN = 'watchman'; From 64a11923a432cb993626ab48e341d529de242472 Mon Sep 17 00:00:00 2001 From: ColCh Date: Tue, 6 Dec 2016 10:53:43 +0300 Subject: [PATCH 2/3] Use other symbol for clearing terminal on Windows --- packages/jest-cli/src/jest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/jest-cli/src/jest.js b/packages/jest-cli/src/jest.js index ba6966990db7..90ada29b3f59 100644 --- a/packages/jest-cli/src/jest.js +++ b/packages/jest-cli/src/jest.js @@ -34,7 +34,7 @@ const sane = require('sane'); const which = require('which'); const TestWatcher = require('./TestWatcher'); -const CLEAR = '\x1B[3J\x1B[H'; +const CLEAR = process.platform === 'win32' ? '\x1Bc' : '\x1B[3J\x1B[H'; const VERSION = require('../package.json').version; const WATCHER_DEBOUNCE = 200; const WATCHMAN_BIN = 'watchman'; From a7a51d8357215c940c144b95170f93594b6cd9cb Mon Sep 17 00:00:00 2001 From: ColCh Date: Tue, 6 Dec 2016 10:56:58 +0300 Subject: [PATCH 3/3] Clear remaining screen on linux/os x --- packages/jest-cli/src/jest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/jest-cli/src/jest.js b/packages/jest-cli/src/jest.js index 90ada29b3f59..f499dd39b5f6 100644 --- a/packages/jest-cli/src/jest.js +++ b/packages/jest-cli/src/jest.js @@ -34,7 +34,7 @@ const sane = require('sane'); const which = require('which'); const TestWatcher = require('./TestWatcher'); -const CLEAR = process.platform === 'win32' ? '\x1Bc' : '\x1B[3J\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';