diff --git a/packages/jest-cli/src/watch.js b/packages/jest-cli/src/watch.js index a6448cfc60cc..137c5acf989b 100644 --- a/packages/jest-cli/src/watch.js +++ b/packages/jest-cli/src/watch.js @@ -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'); @@ -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(