@@ -972,6 +972,17 @@ describe("TriggerChatTransport", function () {
972972 } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
973973 } ) ;
974974
975+ it ( "throws when baseURL contains internal thin-space characters" , function ( ) {
976+ expect ( function ( ) {
977+ new TriggerChatTransport ( {
978+ task : "chat-task" ,
979+ accessToken : "pk_trigger" ,
980+ baseURL : "https://api.trigger.dev/\u2009internal" ,
981+ stream : "chat-stream" ,
982+ } ) ;
983+ } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
984+ } ) ;
985+
975986 it ( "throws when baseURL contains internal mongolian-vowel-separator characters" , function ( ) {
976987 expect ( function ( ) {
977988 new TriggerChatTransport ( {
@@ -1500,6 +1511,17 @@ describe("TriggerChatTransport", function () {
15001511 } ) . not . toThrow ( ) ;
15011512 } ) ;
15021513
1514+ it ( "accepts thin-space wrapped baseURL values" , function ( ) {
1515+ expect ( function ( ) {
1516+ new TriggerChatTransport ( {
1517+ task : "chat-task" ,
1518+ accessToken : "pk_trigger" ,
1519+ baseURL : "\u2009https://api.trigger.dev/custom-prefix/\u2009" ,
1520+ stream : "chat-stream" ,
1521+ } ) ;
1522+ } ) . not . toThrow ( ) ;
1523+ } ) ;
1524+
15031525 it ( "accepts ideographic-space wrapped baseURL values" , function ( ) {
15041526 expect ( function ( ) {
15051527 new TriggerChatTransport ( {
@@ -4131,6 +4153,17 @@ describe("TriggerChatTransport", function () {
41314153 } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
41324154 } ) ;
41334155
4156+ it ( "throws from factory when baseURL contains internal thin-space characters" , function ( ) {
4157+ expect ( function ( ) {
4158+ createTriggerChatTransport ( {
4159+ task : "chat-task" ,
4160+ accessToken : "pk_trigger" ,
4161+ baseURL : "https://api.trigger.dev/\u2009internal" ,
4162+ stream : "chat-stream" ,
4163+ } ) ;
4164+ } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
4165+ } ) ;
4166+
41344167 it ( "throws from factory when baseURL contains internal mongolian-vowel-separator characters" , function ( ) {
41354168 expect ( function ( ) {
41364169 createTriggerChatTransport ( {
@@ -4648,6 +4681,17 @@ describe("TriggerChatTransport", function () {
46484681 } ) . not . toThrow ( ) ;
46494682 } ) ;
46504683
4684+ it ( "accepts thin-space wrapped baseURL values from factory" , function ( ) {
4685+ expect ( function ( ) {
4686+ createTriggerChatTransport ( {
4687+ task : "chat-task" ,
4688+ accessToken : "pk_trigger" ,
4689+ baseURL : "\u2009https://api.trigger.dev/custom-prefix/\u2009" ,
4690+ stream : "chat-stream" ,
4691+ } ) ;
4692+ } ) . not . toThrow ( ) ;
4693+ } ) ;
4694+
46514695 it ( "accepts ideographic-space wrapped baseURL values from factory" , function ( ) {
46524696 expect ( function ( ) {
46534697 createTriggerChatTransport ( {
0 commit comments