Skip to content

Commit

Permalink
New line before quitting watch mode (#5158)
Browse files Browse the repository at this point in the history
* New line before quitting watch mode #5150

* New line before quitting watch mode (eslint fix)
  • Loading branch information
lorenzos authored and cpojer committed Dec 22, 2017
1 parent 8c7ba7e commit 95c0e5f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/jest-cli/src/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ export default function watch(
let activePlugin: ?WatchPlugin;
const onKeypress = (key: string) => {
if (key === KEYS.CONTROL_C || key === KEYS.CONTROL_D) {
outputStream.write('\n');
process.exit(0);
return;
}
Expand Down Expand Up @@ -204,6 +205,7 @@ export default function watch(

switch (key) {
case KEYS.Q:
outputStream.write('\n');
process.exit(0);
return;
case KEYS.ENTER:
Expand Down

0 comments on commit 95c0e5f

Please sign in to comment.