@@ -1005,6 +1005,17 @@ describe("TriggerChatTransport", function () {
10051005 } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
10061006 } ) ;
10071007
1008+ it ( "throws when baseURL contains internal em-space characters" , function ( ) {
1009+ expect ( function ( ) {
1010+ new TriggerChatTransport ( {
1011+ task : "chat-task" ,
1012+ accessToken : "pk_trigger" ,
1013+ baseURL : "https://api.trigger.dev/\u2003internal" ,
1014+ stream : "chat-stream" ,
1015+ } ) ;
1016+ } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
1017+ } ) ;
1018+
10081019 it ( "throws when baseURL contains internal mongolian-vowel-separator characters" , function ( ) {
10091020 expect ( function ( ) {
10101021 new TriggerChatTransport ( {
@@ -1566,6 +1577,17 @@ describe("TriggerChatTransport", function () {
15661577 } ) . not . toThrow ( ) ;
15671578 } ) ;
15681579
1580+ it ( "accepts em-space wrapped baseURL values" , function ( ) {
1581+ expect ( function ( ) {
1582+ new TriggerChatTransport ( {
1583+ task : "chat-task" ,
1584+ accessToken : "pk_trigger" ,
1585+ baseURL : "\u2003https://api.trigger.dev/custom-prefix/\u2003" ,
1586+ stream : "chat-stream" ,
1587+ } ) ;
1588+ } ) . not . toThrow ( ) ;
1589+ } ) ;
1590+
15691591 it ( "accepts ideographic-space wrapped baseURL values" , function ( ) {
15701592 expect ( function ( ) {
15711593 new TriggerChatTransport ( {
@@ -4230,6 +4252,17 @@ describe("TriggerChatTransport", function () {
42304252 } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
42314253 } ) ;
42324254
4255+ it ( "throws from factory when baseURL contains internal em-space characters" , function ( ) {
4256+ expect ( function ( ) {
4257+ createTriggerChatTransport ( {
4258+ task : "chat-task" ,
4259+ accessToken : "pk_trigger" ,
4260+ baseURL : "https://api.trigger.dev/\u2003internal" ,
4261+ stream : "chat-stream" ,
4262+ } ) ;
4263+ } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
4264+ } ) ;
4265+
42334266 it ( "throws from factory when baseURL contains internal mongolian-vowel-separator characters" , function ( ) {
42344267 expect ( function ( ) {
42354268 createTriggerChatTransport ( {
@@ -4780,6 +4813,17 @@ describe("TriggerChatTransport", function () {
47804813 } ) . not . toThrow ( ) ;
47814814 } ) ;
47824815
4816+ it ( "accepts em-space wrapped baseURL values from factory" , function ( ) {
4817+ expect ( function ( ) {
4818+ createTriggerChatTransport ( {
4819+ task : "chat-task" ,
4820+ accessToken : "pk_trigger" ,
4821+ baseURL : "\u2003https://api.trigger.dev/custom-prefix/\u2003" ,
4822+ stream : "chat-stream" ,
4823+ } ) ;
4824+ } ) . not . toThrow ( ) ;
4825+ } ) ;
4826+
47834827 it ( "accepts ideographic-space wrapped baseURL values from factory" , function ( ) {
47844828 expect ( function ( ) {
47854829 createTriggerChatTransport ( {
0 commit comments