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 @@ -610,6 +610,31 @@ describe("TriggerChatTransport", function () {
610610 expect ( stream ) . toBeNull ( ) ;
611611 } ) ;
612612
613+ it ( "returns null when inactive reconnect cleanup delete fails without onError callback" , async function ( ) {
614+ const runStore = new FailingCleanupDeleteRunStore ( 1 ) ;
615+ runStore . set ( {
616+ chatId : "chat-inactive-delete-no-onerror" ,
617+ runId : "run_inactive_delete_no_onerror" ,
618+ publicAccessToken : "pk_inactive_delete_no_onerror" ,
619+ streamKey : "chat-stream" ,
620+ lastEventId : "10-0" ,
621+ isActive : false ,
622+ } ) ;
623+
624+ const transport = new TriggerChatTransport ( {
625+ task : "chat-task" ,
626+ stream : "chat-stream" ,
627+ accessToken : "pk_trigger" ,
628+ runStore,
629+ } ) ;
630+
631+ const stream = await transport . reconnectToStream ( {
632+ chatId : "chat-inactive-delete-no-onerror" ,
633+ } ) ;
634+
635+ expect ( stream ) . toBeNull ( ) ;
636+ } ) ;
637+
613638 it ( "normalizes non-Error inactive reconnect cleanup delete failures through onError" , async function ( ) {
614639 const errors : TriggerChatTransportError [ ] = [ ] ;
615640 const runStore = new FailingCleanupDeleteValueRunStore ( "cleanup delete string failure" ) ;
You can’t perform that action at this time.
0 commit comments