@@ -961,6 +961,17 @@ describe("TriggerChatTransport", function () {
961961 } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
962962 } ) ;
963963
964+ it ( "throws when baseURL contains internal hair-space characters" , function ( ) {
965+ expect ( function ( ) {
966+ new TriggerChatTransport ( {
967+ task : "chat-task" ,
968+ accessToken : "pk_trigger" ,
969+ baseURL : "https://api.trigger.dev/\u200Ainternal" ,
970+ stream : "chat-stream" ,
971+ } ) ;
972+ } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
973+ } ) ;
974+
964975 it ( "throws when baseURL contains internal mongolian-vowel-separator characters" , function ( ) {
965976 expect ( function ( ) {
966977 new TriggerChatTransport ( {
@@ -1478,6 +1489,17 @@ describe("TriggerChatTransport", function () {
14781489 } ) . not . toThrow ( ) ;
14791490 } ) ;
14801491
1492+ it ( "accepts hair-space wrapped baseURL values" , function ( ) {
1493+ expect ( function ( ) {
1494+ new TriggerChatTransport ( {
1495+ task : "chat-task" ,
1496+ accessToken : "pk_trigger" ,
1497+ baseURL : "\u200Ahttps://api.trigger.dev/custom-prefix/\u200A" ,
1498+ stream : "chat-stream" ,
1499+ } ) ;
1500+ } ) . not . toThrow ( ) ;
1501+ } ) ;
1502+
14811503 it ( "accepts ideographic-space wrapped baseURL values" , function ( ) {
14821504 expect ( function ( ) {
14831505 new TriggerChatTransport ( {
@@ -4098,6 +4120,17 @@ describe("TriggerChatTransport", function () {
40984120 } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
40994121 } ) ;
41004122
4123+ it ( "throws from factory when baseURL contains internal hair-space characters" , function ( ) {
4124+ expect ( function ( ) {
4125+ createTriggerChatTransport ( {
4126+ task : "chat-task" ,
4127+ accessToken : "pk_trigger" ,
4128+ baseURL : "https://api.trigger.dev/\u200Ainternal" ,
4129+ stream : "chat-stream" ,
4130+ } ) ;
4131+ } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
4132+ } ) ;
4133+
41014134 it ( "throws from factory when baseURL contains internal mongolian-vowel-separator characters" , function ( ) {
41024135 expect ( function ( ) {
41034136 createTriggerChatTransport ( {
@@ -4604,6 +4637,17 @@ describe("TriggerChatTransport", function () {
46044637 } ) . not . toThrow ( ) ;
46054638 } ) ;
46064639
4640+ it ( "accepts hair-space wrapped baseURL values from factory" , function ( ) {
4641+ expect ( function ( ) {
4642+ createTriggerChatTransport ( {
4643+ task : "chat-task" ,
4644+ accessToken : "pk_trigger" ,
4645+ baseURL : "\u200Ahttps://api.trigger.dev/custom-prefix/\u200A" ,
4646+ stream : "chat-stream" ,
4647+ } ) ;
4648+ } ) . not . toThrow ( ) ;
4649+ } ) ;
4650+
46074651 it ( "accepts ideographic-space wrapped baseURL values from factory" , function ( ) {
46084652 expect ( function ( ) {
46094653 createTriggerChatTransport ( {
0 commit comments