File tree Expand file tree Collapse file tree 2 files changed +0
-51
lines changed
Expand file tree Collapse file tree 2 files changed +0
-51
lines changed Original file line number Diff line number Diff line change @@ -84,8 +84,6 @@ exports.Boom = class Boom extends Error {
8484 Error . captureStackTrace ( this , ctor ) ; // Filter the stack to our external API
8585
8686 this . #apply( data , statusCode , headers ) ;
87-
88- Object . defineProperty ( this , 'typeof' , { value : ctor } ) ;
8987 }
9088
9189 static [ Symbol . hasInstance ] ( instance ) {
Original file line number Diff line number Diff line change @@ -972,55 +972,6 @@ describe('Boom', () => {
972972 } ) ;
973973 } ) ;
974974
975- describe ( 'error.typeof' , ( ) => {
976-
977- const types = [
978- 'badRequest' ,
979- 'unauthorized' ,
980- 'forbidden' ,
981- 'notFound' ,
982- 'methodNotAllowed' ,
983- 'notAcceptable' ,
984- 'proxyAuthRequired' ,
985- 'clientTimeout' ,
986- 'conflict' ,
987- 'resourceGone' ,
988- 'lengthRequired' ,
989- 'preconditionFailed' ,
990- 'entityTooLarge' ,
991- 'uriTooLong' ,
992- 'unsupportedMediaType' ,
993- 'rangeNotSatisfiable' ,
994- 'expectationFailed' ,
995- 'badData' ,
996- 'preconditionRequired' ,
997- 'tooManyRequests' ,
998- 'internal' ,
999- 'notImplemented' ,
1000- 'badGateway' ,
1001- 'serverUnavailable' ,
1002- 'gatewayTimeout' ,
1003- 'badImplementation'
1004- ] ;
1005-
1006- types . forEach ( ( name ) => {
1007-
1008- it ( `matches typeof Boom.${ name } ` , ( ) => {
1009-
1010- const error = Boom [ name ] ( ) ;
1011- types . forEach ( ( type ) => {
1012-
1013- if ( type === name ) {
1014- expect ( error . typeof ) . to . shallow . equal ( Boom [ name ] ) ;
1015- }
1016- else {
1017- expect ( error . typeof ) . to . not . shallow . equal ( Boom [ type ] ) ;
1018- }
1019- } ) ;
1020- } ) ;
1021- } ) ;
1022- } ) ;
1023-
1024975 describe ( 'reformat()' , ( ) => {
1025976
1026977 it ( 'displays internal server error messages in debug mode' , ( ) => {
You can’t perform that action at this time.
0 commit comments