File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -184,13 +184,20 @@ describe('Subclass Instantiation', function () {
184184 // eslint-disable-next-line no-new
185185 new createError . NotFound ( )
186186 } )
187+ assert . doesNotThrow ( ( ) => {
188+ // eslint-disable-next-line no-new
189+ createError . NotFound ( )
190+ } )
187191 } )
188192
189193 it ( 'should allow instantiation of ServerError subclasses' , function ( ) {
190194 assert . doesNotThrow ( ( ) => {
191195 // eslint-disable-next-line no-new
192196 new createError . InternalServerError ( )
193197 } )
198+ assert . doesNotThrow ( ( ) => {
199+ createError . InternalServerError ( )
200+ } )
194201 } )
195202} )
196203
@@ -369,6 +376,10 @@ describe('HTTP Errors', function () {
369376 assert . throws ( function ( ) {
370377 new createError . HttpError ( ) // eslint-disable-line no-new
371378 } , / c a n n o t c o n s t r u c t a b s t r a c t c l a s s / )
379+
380+ assert . throws ( function ( ) {
381+ createError . HttpError ( )
382+ } , / c a n n o t c o n s t r u c t a b s t r a c t c l a s s / )
372383 } )
373384
374385 it ( 'new createError.NotFound()' , function ( ) {
You can’t perform that action at this time.
0 commit comments