File tree 1 file changed +33
-0
lines changed
1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -112,4 +112,37 @@ describe('bonjour option', () => {
112
112
expect ( mockUnpublishAll ) . toHaveBeenCalledTimes ( 0 ) ;
113
113
} ) ;
114
114
} ) ;
115
+
116
+ describe ( 'bonjour object and https' , ( ) => {
117
+ beforeEach ( ( done ) => {
118
+ server = testServer . start (
119
+ config ,
120
+ {
121
+ bonjour : {
122
+ type : 'http' ,
123
+ protocol : 'udp' ,
124
+ } ,
125
+ https : true ,
126
+ port,
127
+ } ,
128
+ done
129
+ ) ;
130
+ } ) ;
131
+
132
+ afterEach ( ( done ) => {
133
+ server . close ( done ) ;
134
+ } ) ;
135
+
136
+ it ( 'prefers bonjour options over devServer.https' , ( ) => {
137
+ expect ( mockPublish ) . toHaveBeenCalledTimes ( 1 ) ;
138
+ expect ( mockPublish ) . toHaveBeenCalledWith ( {
139
+ name : `Webpack Dev Server ${ os . hostname ( ) } :${ port } ` ,
140
+ port,
141
+ type : 'http' ,
142
+ protocol : 'udp' ,
143
+ subtypes : [ 'webpack' ] ,
144
+ } ) ;
145
+ expect ( mockUnpublishAll ) . toHaveBeenCalledTimes ( 0 ) ;
146
+ } ) ;
147
+ } ) ;
115
148
} ) ;
You can’t perform that action at this time.
0 commit comments