@@ -10,26 +10,20 @@ const assert = require('assert');
1010
1111const cli = startCLI ( [ fixtures . path ( 'debugger/three-lines.js' ) ] ) ;
1212
13- cli . waitForInitialBreak ( )
14- . then ( ( ) => cli . waitForPrompt ( ) )
15- . then ( ( ) => cli . command ( 'list(0)' ) )
16- . then ( ( ) => {
17- assert . match ( cli . output , / > 1 l e t x = 1 ; / ) ;
18- } )
19- . then ( ( ) => cli . command ( 'list(1)' ) )
20- . then ( ( ) => {
21- assert . match ( cli . output , / > 1 l e t x = 1 ; \n { 2 } 2 x = x \+ 1 ; / ) ;
22- } )
23- . then ( ( ) => cli . command ( 'list(10)' ) )
24- . then ( ( ) => {
25- assert . match ( cli . output , / > 1 l e t x = 1 ; \n { 2 } 2 x = x \+ 1 ; \n { 2 } 3 m o d u l e \. e x p o r t s = x ; \n { 2 } 4 / ) ;
26- } )
27- . then ( ( ) => cli . command ( 'c' ) )
28- . then ( ( ) => cli . waitFor ( / d i s c o n n e c t / ) )
29- . then ( ( ) => cli . waitFor ( / d e b u g > $ / ) )
30- . then ( ( ) => cli . command ( 'list()' ) )
31- . then ( ( ) => {
32- assert . match ( cli . output , / U n c a u g h t E r r o r \[ E R R _ D E B U G G E R _ E R R O R \] : R e q u i r e s e x e c u t i o n t o b e p a u s e d / ) ;
33- } )
34- . finally ( ( ) => cli . quit ( ) )
35- . then ( common . mustCall ( ) ) ;
13+ ( async ( ) => {
14+ await cli . waitForInitialBreak ( ) ;
15+ await cli . waitForPrompt ( ) ;
16+ await cli . command ( 'list(0)' ) ;
17+ assert . match ( cli . output , / > 1 l e t x = 1 ; / ) ;
18+ await cli . command ( 'list(1)' ) ;
19+ assert . match ( cli . output , / > 1 l e t x = 1 ; \n { 2 } 2 x = x \+ 1 ; / ) ;
20+ await cli . command ( 'list(10)' ) ;
21+ assert . match ( cli . output , / > 1 l e t x = 1 ; \n { 2 } 2 x = x \+ 1 ; \n { 2 } 3 m o d u l e \. e x p o r t s = x ; \n { 2 } 4 / ) ;
22+ await cli . command ( 'c' ) ;
23+ await cli . waitFor ( / d i s c o n n e c t / ) ;
24+ await cli . waitFor ( / d e b u g > $ / ) ;
25+ await cli . command ( 'list()' ) ;
26+ assert . match ( cli . output , / U n c a u g h t E r r o r \[ E R R _ D E B U G G E R _ E R R O R \] : R e q u i r e s e x e c u t i o n t o b e p a u s e d / ) ;
27+ } ) ( )
28+ . finally ( ( ) => cli . quit ( ) )
29+ . then ( common . mustCall ( ) ) ;
0 commit comments