File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -635,6 +635,31 @@ describe("TriggerChatTransport", function () {
635635 expect ( stream ) . toBeNull ( ) ;
636636 } ) ;
637637
638+ it ( "returns null when inactive reconnect string cleanup delete fails without onError callback" , async function ( ) {
639+ const runStore = new FailingCleanupDeleteValueRunStore ( "cleanup delete string failure" ) ;
640+ runStore . set ( {
641+ chatId : "chat-inactive-delete-string-no-onerror" ,
642+ runId : "run_inactive_delete_string_no_onerror" ,
643+ publicAccessToken : "pk_inactive_delete_string_no_onerror" ,
644+ streamKey : "chat-stream" ,
645+ lastEventId : "10-0" ,
646+ isActive : false ,
647+ } ) ;
648+
649+ const transport = new TriggerChatTransport ( {
650+ task : "chat-task" ,
651+ stream : "chat-stream" ,
652+ accessToken : "pk_trigger" ,
653+ runStore,
654+ } ) ;
655+
656+ const stream = await transport . reconnectToStream ( {
657+ chatId : "chat-inactive-delete-string-no-onerror" ,
658+ } ) ;
659+
660+ expect ( stream ) . toBeNull ( ) ;
661+ } ) ;
662+
638663 it ( "normalizes non-Error inactive reconnect cleanup delete failures through onError" , async function ( ) {
639664 const errors : TriggerChatTransportError [ ] = [ ] ;
640665 const runStore = new FailingCleanupDeleteValueRunStore ( "cleanup delete string failure" ) ;
You can’t perform that action at this time.
0 commit comments