1
1
'use strict' ;
2
2
const common = require ( '../common' ) ;
3
-
4
3
common . skipIfInspectorDisabled ( ) ;
5
4
6
5
const fixtures = require ( '../common/fixtures' ) ;
@@ -9,22 +8,18 @@ const startCLI = require('../common/debugger');
9
8
const assert = require ( 'assert' ) ;
10
9
11
10
// 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' ) ;
14
12
15
- const cli = startCLI ( [ '--inspect-port=0' , script ] ) ;
13
+ const cli = startCLI ( [ '--inspect-port=0' , script ] ) ;
16
14
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