Skip to content

Commit

Permalink
Clears screen during watch mode correctly. (jestjs#2959) (jestjs#3294)
Browse files Browse the repository at this point in the history
  • Loading branch information
marr authored and cpojer committed Apr 13, 2017
1 parent 8cf686b commit 4693d83
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 4693d83

Please sign in to comment.