File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -841,6 +841,17 @@ describe("TriggerChatTransport", function () {
841841 } ) . toThrowError ( "baseURL must not include query parameters or hash fragments" ) ;
842842 } ) ;
843843
844+ it ( "throws query/hash validation after trimming wrapper whitespace" , function ( ) {
845+ expect ( function ( ) {
846+ new TriggerChatTransport ( {
847+ task : "chat-task" ,
848+ accessToken : "pk_trigger" ,
849+ baseURL : " https://api.trigger.dev/base?query=1 " ,
850+ stream : "chat-stream" ,
851+ } ) ;
852+ } ) . toThrowError ( "baseURL must not include query parameters or hash fragments" ) ;
853+ } ) ;
854+
844855 it ( "throws when baseURL includes hash fragments" , function ( ) {
845856 expect ( function ( ) {
846857 new TriggerChatTransport ( {
@@ -3426,6 +3437,17 @@ describe("TriggerChatTransport", function () {
34263437 } ) . toThrowError ( "baseURL must not include query parameters or hash fragments" ) ;
34273438 } ) ;
34283439
3440+ it ( "throws query/hash validation after trimming wrapper whitespace in factory" , function ( ) {
3441+ expect ( function ( ) {
3442+ createTriggerChatTransport ( {
3443+ task : "chat-task" ,
3444+ accessToken : "pk_trigger" ,
3445+ baseURL : " https://api.trigger.dev/base?query=1 " ,
3446+ stream : "chat-stream" ,
3447+ } ) ;
3448+ } ) . toThrowError ( "baseURL must not include query parameters or hash fragments" ) ;
3449+ } ) ;
3450+
34293451 it ( "throws from factory when baseURL includes hash fragments" , function ( ) {
34303452 expect ( function ( ) {
34313453 createTriggerChatTransport ( {
You can’t perform that action at this time.
0 commit comments