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 () {
184
184
// eslint-disable-next-line no-new
185
185
new createError . NotFound ( )
186
186
} )
187
+ assert . doesNotThrow ( ( ) => {
188
+ // eslint-disable-next-line no-new
189
+ createError . NotFound ( )
190
+ } )
187
191
} )
188
192
189
193
it ( 'should allow instantiation of ServerError subclasses' , function ( ) {
190
194
assert . doesNotThrow ( ( ) => {
191
195
// eslint-disable-next-line no-new
192
196
new createError . InternalServerError ( )
193
197
} )
198
+ assert . doesNotThrow ( ( ) => {
199
+ createError . InternalServerError ( )
200
+ } )
194
201
} )
195
202
} )
196
203
@@ -369,6 +376,10 @@ describe('HTTP Errors', function () {
369
376
assert . throws ( function ( ) {
370
377
new createError . HttpError ( ) // eslint-disable-line no-new
371
378
} , / 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 / )
372
383
} )
373
384
374
385
it ( 'new createError.NotFound()' , function ( ) {
You can’t perform that action at this time.
0 commit comments