File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -750,7 +750,7 @@ class Server {
750
750
}
751
751
}
752
752
753
- listen ( port , hostname , fn ) {
753
+ listen ( port , hostname = this . options . host , fn ) {
754
754
if (
755
755
typeof this . options . host !== 'undefined' &&
756
756
hostname !== this . options . host
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ jest.mock('sockjs/lib/transport');
12
12
13
13
const baseDevConfig = {
14
14
port,
15
- host : 'localhost' ,
16
15
static : false ,
17
16
} ;
18
17
@@ -148,6 +147,17 @@ describe('Server', () => {
148
147
server . close ( done ) ;
149
148
} ) ;
150
149
150
+ it ( 'should work and listen' , ( done ) => {
151
+ const options = {
152
+ host : 'localhost' ,
153
+ } ;
154
+
155
+ server = new Server ( compiler , options ) ;
156
+
157
+ expect ( ( ) => server . listen ( port ) ) . not . toThrowError ( ) ;
158
+ server . close ( done ) ;
159
+ } ) ;
160
+
151
161
it ( 'should throw an error' , ( done ) => {
152
162
const options = {
153
163
host : '192.160.21.34' ,
You can’t perform that action at this time.
0 commit comments