File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -664,6 +664,17 @@ describe("TriggerChatTransport", function () {
664664 } ) . toThrowError ( "baseURL must not include query parameters or hash fragments" ) ;
665665 } ) ;
666666
667+ it ( "throws when trimmed baseURL includes query parameters" , function ( ) {
668+ expect ( function ( ) {
669+ new TriggerChatTransport ( {
670+ task : "chat-task" ,
671+ accessToken : "pk_trigger" ,
672+ baseURL : " https://example.com/base/?query=1 " ,
673+ stream : "chat-stream" ,
674+ } ) ;
675+ } ) . toThrowError ( "baseURL must not include query parameters or hash fragments" ) ;
676+ } ) ;
677+
667678 it ( "throws when baseURL includes hash fragments" , function ( ) {
668679 expect ( function ( ) {
669680 new TriggerChatTransport ( {
@@ -2925,6 +2936,17 @@ describe("TriggerChatTransport", function () {
29252936 } ) . toThrowError ( "baseURL must not include query parameters or hash fragments" ) ;
29262937 } ) ;
29272938
2939+ it ( "throws from factory when trimmed baseURL includes query parameters" , function ( ) {
2940+ expect ( function ( ) {
2941+ createTriggerChatTransport ( {
2942+ task : "chat-task" ,
2943+ accessToken : "pk_trigger" ,
2944+ baseURL : " https://example.com/base/?query=1 " ,
2945+ stream : "chat-stream" ,
2946+ } ) ;
2947+ } ) . toThrowError ( "baseURL must not include query parameters or hash fragments" ) ;
2948+ } ) ;
2949+
29282950 it ( "throws from factory when baseURL includes hash fragments" , function ( ) {
29292951 expect ( function ( ) {
29302952 createTriggerChatTransport ( {
You can’t perform that action at this time.
0 commit comments