@@ -582,11 +582,13 @@ describe('StreamableHTTPClientTransport', () => {
582582 ok : false ,
583583 status : 401 ,
584584 statusText : 'Unauthorized' ,
585- headers : new Headers ( )
585+ headers : new Headers ( ) ,
586+ text : async ( ) => Promise . reject ( 'dont read my body' )
586587 } )
587588 . mockResolvedValue ( {
588589 ok : false ,
589- status : 404
590+ status : 404 ,
591+ text : async ( ) => Promise . reject ( 'dont read my body' )
590592 } ) ;
591593
592594 await expect ( transport . send ( message ) ) . rejects . toThrow ( UnauthorizedError ) ;
@@ -883,7 +885,8 @@ describe('StreamableHTTPClientTransport', () => {
883885 ok : false ,
884886 status : 401 ,
885887 statusText : 'Unauthorized' ,
886- headers : new Headers ( )
888+ headers : new Headers ( ) ,
889+ text : async ( ) => Promise . reject ( 'dont read my body' )
887890 } ;
888891 ( global . fetch as Mock )
889892 // Initial connection
@@ -936,7 +939,8 @@ describe('StreamableHTTPClientTransport', () => {
936939 ok : false ,
937940 status : 401 ,
938941 statusText : 'Unauthorized' ,
939- headers : new Headers ( )
942+ headers : new Headers ( ) ,
943+ text : async ( ) => Promise . reject ( 'dont read my body' )
940944 } ;
941945 ( global . fetch as Mock )
942946 // Initial connection
@@ -962,7 +966,8 @@ describe('StreamableHTTPClientTransport', () => {
962966 // Fallback should fail to complete the flow
963967 . mockResolvedValue ( {
964968 ok : false ,
965- status : 404
969+ status : 404 ,
970+ text : async ( ) => Promise . reject ( 'dont read my body' )
966971 } ) ;
967972
968973 await expect ( transport . send ( message ) ) . rejects . toThrow ( UnauthorizedError ) ;
@@ -987,7 +992,8 @@ describe('StreamableHTTPClientTransport', () => {
987992 ok : false ,
988993 status : 401 ,
989994 statusText : 'Unauthorized' ,
990- headers : new Headers ( )
995+ headers : new Headers ( ) ,
996+ text : async ( ) => Promise . reject ( 'dont read my body' )
991997 } ;
992998 ( global . fetch as Mock )
993999 // Initial connection
@@ -1013,7 +1019,8 @@ describe('StreamableHTTPClientTransport', () => {
10131019 // Fallback should fail to complete the flow
10141020 . mockResolvedValue ( {
10151021 ok : false ,
1016- status : 404
1022+ status : 404 ,
1023+ text : async ( ) => Promise . reject ( 'dont read my body' )
10171024 } ) ;
10181025
10191026 await expect ( transport . send ( message ) ) . rejects . toThrow ( UnauthorizedError ) ;
@@ -1026,7 +1033,8 @@ describe('StreamableHTTPClientTransport', () => {
10261033 ok : false ,
10271034 status : 401 ,
10281035 statusText : 'Unauthorized' ,
1029- headers : new Headers ( )
1036+ headers : new Headers ( ) ,
1037+ text : async ( ) => Promise . reject ( 'dont read my body' )
10301038 } ;
10311039
10321040 // Create custom fetch
@@ -1328,7 +1336,8 @@ describe('StreamableHTTPClientTransport', () => {
13281336 ok : false ,
13291337 status : 401 ,
13301338 statusText : 'Unauthorized' ,
1331- headers : new Headers ( )
1339+ headers : new Headers ( ) ,
1340+ text : async ( ) => Promise . reject ( 'dont read my body' )
13321341 } ;
13331342
13341343 ( global . fetch as Mock )
0 commit comments