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 @@ -688,6 +688,17 @@ describe("TriggerChatTransport", function () {
688688 } ) . toThrowError ( "baseURL must not be empty" ) ;
689689 } ) ;
690690
691+ it ( "throws when baseURL is empty after trimming non-breaking spaces" , function ( ) {
692+ expect ( function ( ) {
693+ new TriggerChatTransport ( {
694+ task : "chat-task" ,
695+ accessToken : "pk_trigger" ,
696+ baseURL : "\u00A0///\u00A0" ,
697+ stream : "chat-stream" ,
698+ } ) ;
699+ } ) . toThrowError ( "baseURL must not be empty" ) ;
700+ } ) ;
701+
691702 it ( "uses default baseURL when omitted" , function ( ) {
692703 expect ( function ( ) {
693704 new TriggerChatTransport ( {
@@ -3207,6 +3218,17 @@ describe("TriggerChatTransport", function () {
32073218 } ) . toThrowError ( "baseURL must not be empty" ) ;
32083219 } ) ;
32093220
3221+ it ( "throws from factory when baseURL is empty after trimming non-breaking spaces" , function ( ) {
3222+ expect ( function ( ) {
3223+ createTriggerChatTransport ( {
3224+ task : "chat-task" ,
3225+ accessToken : "pk_trigger" ,
3226+ baseURL : "\u00A0///\u00A0" ,
3227+ stream : "chat-stream" ,
3228+ } ) ;
3229+ } ) . toThrowError ( "baseURL must not be empty" ) ;
3230+ } ) ;
3231+
32103232 it ( "uses default baseURL in factory when omitted" , function ( ) {
32113233 expect ( function ( ) {
32123234 createTriggerChatTransport ( {
You can’t perform that action at this time.
0 commit comments