@@ -3,11 +3,9 @@ const common = require('../common');
33
44common . skipIfInspectorDisabled ( ) ;
55
6- const fixtures = require ( '../common/fixtures' ) ;
76const startCLI = require ( '../common/debugger' ) ;
87
98const assert = require ( 'assert' ) ;
10- const { createServer } = require ( 'net' ) ;
119
1210// Launch CLI w/o args.
1311{
@@ -31,29 +29,3 @@ const { createServer } = require('net');
3129 assert . strictEqual ( code , 1 ) ;
3230 } ) ;
3331}
34-
35- // Launch w/ unavailable port.
36- ( async ( ) => {
37- const blocker = createServer ( ( socket ) => socket . end ( ) ) ;
38- const port = await new Promise ( ( resolve , reject ) => {
39- blocker . on ( 'error' , reject ) ;
40- blocker . listen ( 0 , '127.0.0.1' , ( ) => resolve ( blocker . address ( ) . port ) ) ;
41- } ) ;
42-
43- try {
44- const script = fixtures . path ( 'debugger' , 'three-lines.js' ) ;
45- const cli = startCLI ( [ `--port=${ port } ` , script ] ) ;
46- const code = await cli . quit ( ) ;
47-
48- assert . doesNotMatch (
49- cli . output ,
50- / r e p o r t t h i s b u g / ,
51- 'Omits message about reporting this as a bug' ) ;
52- assert . ok (
53- cli . output . includes ( `waiting for 127.0.0.1:${ port } to be free` ) ,
54- 'Tells the user that the port wasn\'t available' ) ;
55- assert . strictEqual ( code , 1 ) ;
56- } finally {
57- blocker . close ( ) ;
58- }
59- } ) ( ) . then ( common . mustCall ( ) ) ;
0 commit comments