@@ -994,6 +994,17 @@ describe("TriggerChatTransport", function () {
994994 } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
995995 } ) ;
996996
997+ it ( "throws when baseURL contains internal six-per-em-space characters" , function ( ) {
998+ expect ( function ( ) {
999+ new TriggerChatTransport ( {
1000+ task : "chat-task" ,
1001+ accessToken : "pk_trigger" ,
1002+ baseURL : "https://api.trigger.dev/\u2006internal" ,
1003+ stream : "chat-stream" ,
1004+ } ) ;
1005+ } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
1006+ } ) ;
1007+
9971008 it ( "throws when baseURL contains internal mongolian-vowel-separator characters" , function ( ) {
9981009 expect ( function ( ) {
9991010 new TriggerChatTransport ( {
@@ -1544,6 +1555,17 @@ describe("TriggerChatTransport", function () {
15441555 } ) . not . toThrow ( ) ;
15451556 } ) ;
15461557
1558+ it ( "accepts six-per-em-space wrapped baseURL values" , function ( ) {
1559+ expect ( function ( ) {
1560+ new TriggerChatTransport ( {
1561+ task : "chat-task" ,
1562+ accessToken : "pk_trigger" ,
1563+ baseURL : "\u2006https://api.trigger.dev/custom-prefix/\u2006" ,
1564+ stream : "chat-stream" ,
1565+ } ) ;
1566+ } ) . not . toThrow ( ) ;
1567+ } ) ;
1568+
15471569 it ( "accepts ideographic-space wrapped baseURL values" , function ( ) {
15481570 expect ( function ( ) {
15491571 new TriggerChatTransport ( {
@@ -4197,6 +4219,17 @@ describe("TriggerChatTransport", function () {
41974219 } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
41984220 } ) ;
41994221
4222+ it ( "throws from factory when baseURL contains internal six-per-em-space characters" , function ( ) {
4223+ expect ( function ( ) {
4224+ createTriggerChatTransport ( {
4225+ task : "chat-task" ,
4226+ accessToken : "pk_trigger" ,
4227+ baseURL : "https://api.trigger.dev/\u2006internal" ,
4228+ stream : "chat-stream" ,
4229+ } ) ;
4230+ } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
4231+ } ) ;
4232+
42004233 it ( "throws from factory when baseURL contains internal mongolian-vowel-separator characters" , function ( ) {
42014234 expect ( function ( ) {
42024235 createTriggerChatTransport ( {
@@ -4736,6 +4769,17 @@ describe("TriggerChatTransport", function () {
47364769 } ) . not . toThrow ( ) ;
47374770 } ) ;
47384771
4772+ it ( "accepts six-per-em-space wrapped baseURL values from factory" , function ( ) {
4773+ expect ( function ( ) {
4774+ createTriggerChatTransport ( {
4775+ task : "chat-task" ,
4776+ accessToken : "pk_trigger" ,
4777+ baseURL : "\u2006https://api.trigger.dev/custom-prefix/\u2006" ,
4778+ stream : "chat-stream" ,
4779+ } ) ;
4780+ } ) . not . toThrow ( ) ;
4781+ } ) ;
4782+
47394783 it ( "accepts ideographic-space wrapped baseURL values from factory" , function ( ) {
47404784 expect ( function ( ) {
47414785 createTriggerChatTransport ( {
0 commit comments