@@ -1094,6 +1094,17 @@ describe("TriggerChatTransport", function () {
10941094 } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
10951095 } ) ;
10961096
1097+ it ( "prioritizes invisible-separator validation over protocol/query/hash/credential validation" , function ( ) {
1098+ expect ( function ( ) {
1099+ new TriggerChatTransport ( {
1100+ task : "chat-task" ,
1101+ accessToken : "pk_trigger" ,
1102+ baseURL : "ftp://user:pass@example.com/\u2060invalid?query=1#fragment" ,
1103+ stream : "chat-stream" ,
1104+ } ) ;
1105+ } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
1106+ } ) ;
1107+
10971108 it ( "prioritizes query/hash validation over credential validation" , function ( ) {
10981109 expect ( function ( ) {
10991110 new TriggerChatTransport ( {
@@ -3899,6 +3910,17 @@ describe("TriggerChatTransport", function () {
38993910 } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
39003911 } ) ;
39013912
3913+ it ( "prioritizes invisible-separator validation over protocol/query/hash/credential validation in factory" , function ( ) {
3914+ expect ( function ( ) {
3915+ createTriggerChatTransport ( {
3916+ task : "chat-task" ,
3917+ accessToken : "pk_trigger" ,
3918+ baseURL : "ftp://user:pass@example.com/\u2060invalid?query=1#fragment" ,
3919+ stream : "chat-stream" ,
3920+ } ) ;
3921+ } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
3922+ } ) ;
3923+
39023924 it ( "prioritizes query/hash validation over credential validation in factory" , function ( ) {
39033925 expect ( function ( ) {
39043926 createTriggerChatTransport ( {
0 commit comments