@@ -90,9 +90,7 @@ describe('TLS callback exception handling', () => {
9090 }
9191 } ) ) ;
9292
93- server . on ( 'secureConnection' , common . mustNotCall ( ( ) => {
94- reject ( new Error ( 'secureConnection should not fire' ) ) ;
95- } ) ) ;
93+ server . on ( 'secureConnection' , common . mustNotCall ( 'secureConnection should not fire' ) ) ;
9694
9795 await new Promise ( ( res ) => server . listen ( 0 , res ) ) ;
9896
@@ -137,9 +135,7 @@ describe('TLS callback exception handling', () => {
137135 }
138136 } ) ) ;
139137
140- server . on ( 'secureConnection' , common . mustNotCall ( ( ) => {
141- reject ( new Error ( 'secureConnection should not fire' ) ) ;
142- } ) ) ;
138+ server . on ( 'secureConnection' , common . mustNotCall ( 'secureConnection should not fire' ) ) ;
143139
144140 await new Promise ( ( res ) => server . listen ( 0 , res ) ) ;
145141
@@ -185,9 +181,7 @@ describe('TLS callback exception handling', () => {
185181 }
186182 } ) ) ;
187183
188- server . on ( 'secureConnection' , common . mustNotCall ( ( ) => {
189- reject ( new Error ( 'secureConnection should not fire' ) ) ;
190- } ) ) ;
184+ server . on ( 'secureConnection' , common . mustNotCall ( 'secureConnection should not fire' ) ) ;
191185
192186 await new Promise ( ( res ) => server . listen ( 0 , res ) ) ;
193187
@@ -228,9 +222,7 @@ describe('TLS callback exception handling', () => {
228222 }
229223 } ) ) ;
230224
231- server . on ( 'secureConnection' , common . mustNotCall ( ( ) => {
232- reject ( new Error ( 'secureConnection should not fire' ) ) ;
233- } ) ) ;
225+ server . on ( 'secureConnection' , common . mustNotCall ( 'secureConnection should not fire' ) ) ;
234226 await new Promise ( ( res ) => server . listen ( 0 , res ) ) ;
235227
236228 const client = tls . connect ( {
@@ -259,9 +251,7 @@ describe('TLS callback exception handling', () => {
259251
260252 const { promise, resolve, reject } = createTestPromise ( ) ;
261253
262- server . on ( 'secureConnection' , common . mustNotCall ( ( ) => {
263- reject ( new Error ( 'secureConnection should not fire' ) ) ;
264- } ) ) ;
254+ server . on ( 'secureConnection' , common . mustNotCall ( 'secureConnection should not fire' ) ) ;
265255
266256 await new Promise ( ( res ) => server . listen ( 0 , res ) ) ;
267257
@@ -303,9 +293,7 @@ describe('TLS callback exception handling', () => {
303293
304294 const { promise, resolve, reject } = createTestPromise ( ) ;
305295
306- server . on ( 'secureConnection' , common . mustNotCall ( ( ) => {
307- reject ( new Error ( 'secureConnection should not fire' ) ) ;
308- } ) ) ;
296+ server . on ( 'secureConnection' , common . mustNotCall ( 'secureConnection should not fire' ) ) ;
309297
310298 await new Promise ( ( res ) => server . listen ( 0 , res ) ) ;
311299
0 commit comments