Skip to content

Commit

Permalink
Clears screen during watch mode correctly. (jestjs#2959)
Browse files Browse the repository at this point in the history
  • Loading branch information
marr committed Apr 12, 2017
1 parent 6517c7b commit d4df7b4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/jest-cli/src/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ const ansiEscapes = require('ansi-escapes');
const chalk = require('chalk');
const createContext = require('./lib/createContext');
const HasteMap = require('jest-haste-map');
const isCI = require('is-ci');
const isInteractive = process.stdout.isTTY && !isCI;
const isValidPath = require('./lib/isValidPath');
const preRunMessage = require('./preRunMessage');
const runJest = require('./runJest');
Expand Down Expand Up @@ -86,7 +88,7 @@ const watch = (
}

testWatcher = new TestWatcher({isWatchMode: true});
pipe.write(CLEAR);
isInteractive && pipe.write(CLEAR);
preRunMessage.print(pipe);
isRunning = true;
return runJest(
Expand Down

0 comments on commit d4df7b4

Please sign in to comment.