@@ -400,7 +400,7 @@ describe('Bearer Auth by Middleware', () => {
400400 const res = await app . request ( req )
401401 expect ( res ) . not . toBeNull ( )
402402 expect ( res . status ) . toBe ( 401 )
403- expect ( res . headers . get ( 'Content-Type' ) ) . toMatch ( 'application/json; charset=UTF-8 ' )
403+ expect ( res . headers . get ( 'Content-Type' ) ) . toMatch ( 'application/json' )
404404 expect ( handlerExecuted ) . toBeFalsy ( )
405405 expect ( await res . text ( ) ) . toBe ( '{"message":"Custom no authentication header message as object"}' )
406406 } )
@@ -423,7 +423,7 @@ describe('Bearer Auth by Middleware', () => {
423423 const res = await app . request ( req )
424424 expect ( res ) . not . toBeNull ( )
425425 expect ( res . status ) . toBe ( 401 )
426- expect ( res . headers . get ( 'Content-Type' ) ) . toMatch ( 'application/json; charset=UTF-8 ' )
426+ expect ( res . headers . get ( 'Content-Type' ) ) . toMatch ( 'application/json' )
427427 expect ( handlerExecuted ) . toBeFalsy ( )
428428 expect ( await res . text ( ) ) . toBe (
429429 '{"message":"Custom no authentication header message as function object"}'
@@ -450,7 +450,7 @@ describe('Bearer Auth by Middleware', () => {
450450 const res = await app . request ( req )
451451 expect ( res ) . not . toBeNull ( )
452452 expect ( res . status ) . toBe ( 400 )
453- expect ( res . headers . get ( 'Content-Type' ) ) . toMatch ( 'application/json; charset=UTF-8 ' )
453+ expect ( res . headers . get ( 'Content-Type' ) ) . toMatch ( 'application/json' )
454454 expect ( handlerExecuted ) . toBeFalsy ( )
455455 expect ( await res . text ( ) ) . toBe (
456456 '{"message":"Custom invalid authentication header message as object"}'
@@ -477,7 +477,7 @@ describe('Bearer Auth by Middleware', () => {
477477 const res = await app . request ( req )
478478 expect ( res ) . not . toBeNull ( )
479479 expect ( res . status ) . toBe ( 400 )
480- expect ( res . headers . get ( 'Content-Type' ) ) . toMatch ( 'application/json; charset=UTF-8 ' )
480+ expect ( res . headers . get ( 'Content-Type' ) ) . toMatch ( 'application/json' )
481481 expect ( handlerExecuted ) . toBeFalsy ( )
482482 expect ( await res . text ( ) ) . toBe (
483483 '{"message":"Custom invalid authentication header message as function object"}'
@@ -500,7 +500,7 @@ describe('Bearer Auth by Middleware', () => {
500500 const res = await app . request ( req )
501501 expect ( res ) . not . toBeNull ( )
502502 expect ( res . status ) . toBe ( 401 )
503- expect ( res . headers . get ( 'Content-Type' ) ) . toMatch ( 'application/json; charset=UTF-8 ' )
503+ expect ( res . headers . get ( 'Content-Type' ) ) . toMatch ( 'application/json' )
504504 expect ( handlerExecuted ) . toBeFalsy ( )
505505 expect ( await res . text ( ) ) . toBe ( '{"message":"Custom invalid token message as object"}' )
506506 } )
@@ -521,7 +521,7 @@ describe('Bearer Auth by Middleware', () => {
521521 const res = await app . request ( req )
522522 expect ( res ) . not . toBeNull ( )
523523 expect ( res . status ) . toBe ( 401 )
524- expect ( res . headers . get ( 'Content-Type' ) ) . toMatch ( 'application/json; charset=UTF-8 ' )
524+ expect ( res . headers . get ( 'Content-Type' ) ) . toMatch ( 'application/json' )
525525 expect ( handlerExecuted ) . toBeFalsy ( )
526526 expect ( await res . text ( ) ) . toBe ( '{"message":"Custom invalid token message as function object"}' )
527527 } )
0 commit comments