File tree Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -16,24 +16,22 @@ const startCLI = require('../common/debugger');
1616 const script = fixtures . path ( 'debugger' , 'three-lines.js' ) ;
1717 const cli = startCLI ( [ script ] ) ;
1818
19- function onFatal ( error ) {
20- cli . quit ( ) ;
21- throw error ;
22- }
23-
2419 const listeningRegExp = / D e b u g g e r l i s t e n i n g o n / g;
2520
26- cli . waitForInitialBreak ( )
27- . then ( ( ) => cli . waitForPrompt ( ) )
28- . then ( ( ) => {
21+ async function onWaitForInitialBreak ( ) {
22+ try {
23+ await cli . waitForInitialBreak ( ) ;
24+ await cli . waitForPrompt ( ) ;
2925 assert . strictEqual ( cli . output . match ( listeningRegExp ) . length , 1 ) ;
30- } )
31- . then ( async ( ) => {
26+
3227 for ( let i = 0 ; i < RESTARTS ; i ++ ) {
3328 await cli . stepCommand ( 'restart' ) ;
3429 assert . strictEqual ( cli . output . match ( listeningRegExp ) . length , 1 ) ;
3530 }
36- } )
37- . then ( ( ) => cli . quit ( ) )
38- . then ( null , onFatal ) ;
31+ } finally {
32+ await cli . quit ( ) ;
33+ }
34+ }
35+
36+ onWaitForInitialBreak ( ) ;
3937}
You can’t perform that action at this time.
0 commit comments