File tree Expand file tree Collapse file tree 1 file changed +13
-17
lines changed Expand file tree Collapse file tree 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');
88const assert = require ( 'assert' ) ;
99
1010// Launch CLI w/o args.
11- {
11+ ( async ( ) => {
1212 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 ( ) ) ;
1917
2018// Launch w/ invalid host:port.
21- {
19+ ( async ( ) => {
2220 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