File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -814,13 +814,18 @@ describe("onCallHandler", () => {
814
814
{
815
815
cors : { origin : true , methods : "POST" } ,
816
816
} ,
817
- ( req , resp ) => {
817
+ ( ) => {
818
818
return "hello world" ;
819
819
} ,
820
820
"gcfv1"
821
821
) ;
822
822
const resp = await runHandler ( fn , mockReq ) ;
823
- expect ( JSON . parse ( resp . body ) ) . to . deep . equal ( { "error" : { "status" : "INVALID_ARGUMENT" , "message" : "Unsupported Accept header 'text/event-stream'" } } ) ;
823
+ expect ( JSON . parse ( resp . body ) ) . to . deep . equal ( {
824
+ error : {
825
+ status : "INVALID_ARGUMENT" ,
826
+ message : "Unsupported Accept header 'text/event-stream'" ,
827
+ } ,
828
+ } ) ;
824
829
} ) ;
825
830
} ) ;
826
831
} ) ;
Original file line number Diff line number Diff line change @@ -785,7 +785,7 @@ function wrapOnCallHandler<Req = any, Res = any>(
785
785
786
786
if ( acceptsStreaming && version === "gcfv1" ) {
787
787
// streaming responses are not supported in v1 callable
788
- throw new HttpsError ( ' invalid-argument' , "Unsupported Accept header 'text/event-stream'" )
788
+ throw new HttpsError ( " invalid-argument" , "Unsupported Accept header 'text/event-stream'" ) ;
789
789
}
790
790
791
791
const data : Req = decode ( req . body . data ) ;
@@ -844,5 +844,5 @@ function wrapOnCallHandler<Req = any, Res = any>(
844
844
res . status ( status ) . send ( body ) ;
845
845
}
846
846
}
847
- }
848
- } ;
847
+ } ;
848
+ }
You can’t perform that action at this time.
0 commit comments