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 @@ -763,6 +763,17 @@ describe("TriggerChatTransport", function () {
763763 } ) . toThrowError ( "baseURL must use http or https protocol" ) ;
764764 } ) ;
765765
766+ it ( "prioritizes protocol validation over query/hash/credential validation" , function ( ) {
767+ expect ( function ( ) {
768+ new TriggerChatTransport ( {
769+ task : "chat-task" ,
770+ accessToken : "pk_trigger" ,
771+ baseURL : "ftp://user:pass@example.com/base?query=1#fragment" ,
772+ stream : "chat-stream" ,
773+ } ) ;
774+ } ) . toThrowError ( "baseURL must use http or https protocol" ) ;
775+ } ) ;
776+
766777 it ( "prioritizes query/hash validation over credential validation" , function ( ) {
767778 expect ( function ( ) {
768779 new TriggerChatTransport ( {
@@ -3239,6 +3250,17 @@ describe("TriggerChatTransport", function () {
32393250 } ) . toThrowError ( "baseURL must use http or https protocol" ) ;
32403251 } ) ;
32413252
3253+ it ( "prioritizes protocol validation over query/hash/credential validation in factory" , function ( ) {
3254+ expect ( function ( ) {
3255+ createTriggerChatTransport ( {
3256+ task : "chat-task" ,
3257+ accessToken : "pk_trigger" ,
3258+ baseURL : "ftp://user:pass@example.com/base?query=1#fragment" ,
3259+ stream : "chat-stream" ,
3260+ } ) ;
3261+ } ) . toThrowError ( "baseURL must use http or https protocol" ) ;
3262+ } ) ;
3263+
32423264 it ( "prioritizes query/hash validation over credential validation in factory" , function ( ) {
32433265 expect ( function ( ) {
32443266 createTriggerChatTransport ( {
You can’t perform that action at this time.
0 commit comments