File tree 1 file changed +13
-17
lines changed
1 file changed +13
-17
lines changed Original file line number Diff line number Diff line change @@ -8,24 +8,20 @@ const startCLI = require('../common/debugger');
8
8
const assert = require ( 'assert' ) ;
9
9
10
10
// Launch CLI w/o args.
11
- {
11
+ ( async ( ) => {
12
12
const cli = startCLI ( [ ] ) ;
13
- cli . quit ( )
14
- . then ( ( code ) => {
15
- assert . strictEqual ( code , 1 ) ;
16
- assert . match ( cli . output , / ^ U s a g e : / , 'Prints usage info' ) ;
17
- } ) ;
18
- }
13
+ const code = await cli . quit ( ) ;
14
+ assert . strictEqual ( code , 1 ) ;
15
+ assert . match ( cli . output , / ^ U s a g e : / , 'Prints usage info' ) ;
16
+ } ) ( ) . then ( common . mustCall ( ) ) ;
19
17
20
18
// Launch w/ invalid host:port.
21
- {
19
+ ( async ( ) => {
22
20
const cli = startCLI ( [ `localhost:${ common . PORT } ` ] ) ;
23
- cli . quit ( )
24
- . then ( ( code ) => {
25
- assert . match (
26
- cli . output ,
27
- / f a i l e d t o c o n n e c t / ,
28
- 'Tells the user that the connection failed' ) ;
29
- assert . strictEqual ( code , 1 ) ;
30
- } ) ;
31
- }
21
+ const code = await cli . quit ( ) ;
22
+ assert . match (
23
+ cli . output ,
24
+ / f a i l e d t o c o n n e c t / ,
25
+ 'Tells the user that the connection failed' ) ;
26
+ assert . strictEqual ( code , 1 ) ;
27
+ } ) ( ) . then ( common . mustCall ( ) ) ;
You can’t perform that action at this time.
0 commit comments