File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55### Fixes
66
7+ * ` [jest-cli] ` Fix inability to quit watch mode while debugger is still attached
8+ ([ #5029 ] ( https://github.com/facebook/jest/pull/5029 ) )
79* ` [jest-haste-map] ` Properly handle platform-specific file deletions
810 ([ #5534 ] ( https://github.com/facebook/jest/pull/5534 ) )
911
Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ import WatchPlugin from '../watch_plugin';
1010
1111class QuitPlugin extends WatchPlugin {
1212 async showPrompt ( ) {
13+ if ( typeof this . _stdin . setRawMode === 'function' ) {
14+ this . _stdin . setRawMode ( false ) ;
15+ }
1316 this . _stdout . write ( '\n' ) ;
1417 process . exit ( 0 ) ;
1518 }
Original file line number Diff line number Diff line change @@ -230,6 +230,9 @@ export default function watch(
230230
231231 const onKeypress = ( key : string ) => {
232232 if ( key === KEYS . CONTROL_C || key === KEYS . CONTROL_D ) {
233+ if ( typeof stdin . setRawMode === 'function' ) {
234+ stdin . setRawMode ( false ) ;
235+ }
233236 outputStream . write ( '\n' ) ;
234237 exit ( 0 ) ;
235238 return ;
You can’t perform that action at this time.
0 commit comments