11'use strict' ; 
22const  common  =  require ( '../common' ) ; 
3- 
43common . skipIfInspectorDisabled ( ) ; 
54
65const  fixtures  =  require ( '../common/fixtures' ) ; 
@@ -9,22 +8,18 @@ const startCLI = require('../common/debugger');
98const  assert  =  require ( 'assert' ) ; 
109
1110// Random port with --inspect-port=0. 
12- { 
13-   const  script  =  fixtures . path ( 'debugger' ,  'three-lines.js' ) ; 
11+ const  script  =  fixtures . path ( 'debugger' ,  'three-lines.js' ) ; 
1412
15-    const  cli  =  startCLI ( [ '--inspect-port=0' ,  script ] ) ; 
13+ const  cli  =  startCLI ( [ '--inspect-port=0' ,  script ] ) ; 
1614
17-   cli . waitForInitialBreak ( ) 
18-     . then ( ( )  =>  cli . waitForPrompt ( ) ) 
19-     . then ( ( )  =>  { 
20-       assert . match ( cli . output ,  / d e b u g > / ,  'prints a prompt' ) ; 
21-       assert . match ( 
22-         cli . output , 
23-         / <   D e b u g g e r   l i s t e n i n g   o n   / , 
24-         'forwards child output' ) ; 
25-     } ) 
26-     . then ( ( )  =>  cli . quit ( ) ) 
27-     . then ( ( code )  =>  { 
28-       assert . strictEqual ( code ,  0 ) ; 
29-     } ) ; 
30- } 
15+ ( async  ( )  =>  { 
16+   await  cli . waitForInitialBreak ( ) ; 
17+   await  cli . waitForPrompt ( ) ; 
18+   assert . match ( cli . output ,  / d e b u g > / ,  'prints a prompt' ) ; 
19+   assert . match ( 
20+     cli . output , 
21+     / <   D e b u g g e r   l i s t e n i n g   o n   / , 
22+     'forwards child output' ) ; 
23+   const  code  =  await  cli . quit ( ) ; 
24+   assert . strictEqual ( code ,  0 ) ; 
25+ } ) ( ) . then ( common . mustCall ( ) ) ; 
0 commit comments