File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed
Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -675,6 +675,7 @@ Examples:
675675- ❌ ` ftp://api.trigger.dev `
676676- ❌ ` ws://api.trigger.dev ` / ` wss://api.trigger.dev `
677677- ❌ ` https://api.trigger.dev/\ninternal `
678+ - ❌ ` https://api.trigger.dev/in valid `
678679- ❌ ` https://api.trigger.dev/\tinternal `
679680- ❌ ` https://api.trigger.dev/\vinternal `
680681- ❌ ` https://api.trigger.dev/\finternal `
Original file line number Diff line number Diff line change @@ -182,6 +182,7 @@ Examples:
182182- ❌ ` ftp://api.trigger.dev ` (non-http protocol)
183183- ❌ ` ws://api.trigger.dev ` / ` wss://api.trigger.dev ` (websocket protocols are rejected)
184184- ❌ ` https://api.trigger.dev/\ninternal ` (internal whitespace characters)
185+ - ❌ ` https://api.trigger.dev/in valid ` (internal space characters)
185186- ❌ ` https://api.trigger.dev/\tinternal ` (internal tab characters)
186187- ❌ ` https://api.trigger.dev/\vinternal ` (internal vertical-tab characters)
187188- ❌ ` https://api.trigger.dev/\finternal ` (internal form-feed characters)
Original file line number Diff line number Diff line change @@ -731,6 +731,17 @@ describe("TriggerChatTransport", function () {
731731 } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
732732 } ) ;
733733
734+ it ( "throws when baseURL contains internal space characters" , function ( ) {
735+ expect ( function ( ) {
736+ new TriggerChatTransport ( {
737+ task : "chat-task" ,
738+ accessToken : "pk_trigger" ,
739+ baseURL : "https://api.trigger.dev/in valid" ,
740+ stream : "chat-stream" ,
741+ } ) ;
742+ } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
743+ } ) ;
744+
734745 it ( "throws when baseURL contains internal tab characters" , function ( ) {
735746 expect ( function ( ) {
736747 new TriggerChatTransport ( {
@@ -3404,6 +3415,17 @@ describe("TriggerChatTransport", function () {
34043415 } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
34053416 } ) ;
34063417
3418+ it ( "throws from factory when baseURL contains internal space characters" , function ( ) {
3419+ expect ( function ( ) {
3420+ createTriggerChatTransport ( {
3421+ task : "chat-task" ,
3422+ accessToken : "pk_trigger" ,
3423+ baseURL : "https://api.trigger.dev/in valid" ,
3424+ stream : "chat-stream" ,
3425+ } ) ;
3426+ } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
3427+ } ) ;
3428+
34073429 it ( "throws from factory when baseURL contains internal tab characters" , function ( ) {
34083430 expect ( function ( ) {
34093431 createTriggerChatTransport ( {
You can’t perform that action at this time.
0 commit comments