@@ -15,10 +15,6 @@ function close() { this.close(); }
15
15
// Test listen({port})
16
16
net . createServer ( ) . listen ( { port : 0 } )
17
17
. on ( 'listening' , common . mustCall ( close ) ) ;
18
- // Test listen(host, port }) on ipv4
19
- net . createServer ( ) . listen ( { host : '127.0.0.1' , port : '3000' } ) . on ( 'listening' , common . mustCall ( close ) ) ;
20
- // Test listen(host, port }) on ipv6
21
- net . createServer ( ) . listen ( { host : '::' , port : '3001' } ) . on ( 'listening' , common . mustCall ( close ) ) ;
22
18
}
23
19
24
20
// Test listen(port, cb) and listen({ port }, cb) combinations
@@ -70,13 +66,6 @@ const listenOnPort = [
70
66
name : 'TypeError' ,
71
67
message : / ^ T h e a r g u m e n t ' o p t i o n s ' m u s t h a v e t h e p r o p e r t y " p o r t " o r " p a t h " \. R e c e i v e d .+ $ / ,
72
68
} ) ;
73
- } else if ( typeof options . host === 'string' && ! options . host . match ( / ^ [ a - z A - Z 0 - 9 - :% .] + $ / ) ) {
74
- assert . throws ( fn ,
75
- {
76
- code : 'ERR_INVALID_ARG_VALUE' ,
77
- name : 'TypeError' ,
78
- message : / ^ T h e a r g u m e n t ' h o s t ' i s i n v a l i d \. R e c e i v e d .+ $ / ,
79
- } ) ;
80
69
} else {
81
70
assert . throws ( fn ,
82
71
{
@@ -102,5 +91,4 @@ const listenOnPort = [
102
91
shouldFailToListen ( { host : 'localhost:3000' } ) ;
103
92
shouldFailToListen ( { host : { port : 3000 } } ) ;
104
93
shouldFailToListen ( { exclusive : true } ) ;
105
- shouldFailToListen ( { host : '[::]' , port : 3000 } ) ;
106
94
}
0 commit comments