@@ -3,11 +3,9 @@ const common = require('../common');
3
3
4
4
common . skipIfInspectorDisabled ( ) ;
5
5
6
- const fixtures = require ( '../common/fixtures' ) ;
7
6
const startCLI = require ( '../common/debugger' ) ;
8
7
9
8
const assert = require ( 'assert' ) ;
10
- const { createServer } = require ( 'net' ) ;
11
9
12
10
// Launch CLI w/o args.
13
11
{
@@ -31,29 +29,3 @@ const { createServer } = require('net');
31
29
assert . strictEqual ( code , 1 ) ;
32
30
} ) ;
33
31
}
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