@@ -983,6 +983,17 @@ describe("TriggerChatTransport", function () {
983983 } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
984984 } ) ;
985985
986+ it ( "throws when baseURL contains internal punctuation-space characters" , function ( ) {
987+ expect ( function ( ) {
988+ new TriggerChatTransport ( {
989+ task : "chat-task" ,
990+ accessToken : "pk_trigger" ,
991+ baseURL : "https://api.trigger.dev/\u2008internal" ,
992+ stream : "chat-stream" ,
993+ } ) ;
994+ } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
995+ } ) ;
996+
986997 it ( "throws when baseURL contains internal mongolian-vowel-separator characters" , function ( ) {
987998 expect ( function ( ) {
988999 new TriggerChatTransport ( {
@@ -1522,6 +1533,17 @@ describe("TriggerChatTransport", function () {
15221533 } ) . not . toThrow ( ) ;
15231534 } ) ;
15241535
1536+ it ( "accepts punctuation-space wrapped baseURL values" , function ( ) {
1537+ expect ( function ( ) {
1538+ new TriggerChatTransport ( {
1539+ task : "chat-task" ,
1540+ accessToken : "pk_trigger" ,
1541+ baseURL : "\u2008https://api.trigger.dev/custom-prefix/\u2008" ,
1542+ stream : "chat-stream" ,
1543+ } ) ;
1544+ } ) . not . toThrow ( ) ;
1545+ } ) ;
1546+
15251547 it ( "accepts ideographic-space wrapped baseURL values" , function ( ) {
15261548 expect ( function ( ) {
15271549 new TriggerChatTransport ( {
@@ -4164,6 +4186,17 @@ describe("TriggerChatTransport", function () {
41644186 } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
41654187 } ) ;
41664188
4189+ it ( "throws from factory when baseURL contains internal punctuation-space characters" , function ( ) {
4190+ expect ( function ( ) {
4191+ createTriggerChatTransport ( {
4192+ task : "chat-task" ,
4193+ accessToken : "pk_trigger" ,
4194+ baseURL : "https://api.trigger.dev/\u2008internal" ,
4195+ stream : "chat-stream" ,
4196+ } ) ;
4197+ } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
4198+ } ) ;
4199+
41674200 it ( "throws from factory when baseURL contains internal mongolian-vowel-separator characters" , function ( ) {
41684201 expect ( function ( ) {
41694202 createTriggerChatTransport ( {
@@ -4692,6 +4725,17 @@ describe("TriggerChatTransport", function () {
46924725 } ) . not . toThrow ( ) ;
46934726 } ) ;
46944727
4728+ it ( "accepts punctuation-space wrapped baseURL values from factory" , function ( ) {
4729+ expect ( function ( ) {
4730+ createTriggerChatTransport ( {
4731+ task : "chat-task" ,
4732+ accessToken : "pk_trigger" ,
4733+ baseURL : "\u2008https://api.trigger.dev/custom-prefix/\u2008" ,
4734+ stream : "chat-stream" ,
4735+ } ) ;
4736+ } ) . not . toThrow ( ) ;
4737+ } ) ;
4738+
46954739 it ( "accepts ideographic-space wrapped baseURL values from factory" , function ( ) {
46964740 expect ( function ( ) {
46974741 createTriggerChatTransport ( {
0 commit comments