@@ -3535,33 +3535,36 @@ describe("dispatchCronDelivery — double-announce guard", () => {
35353535 expect ( deliverOutboundPayloads ) . not . toHaveBeenCalled ( ) ;
35363536 } ) ;
35373537
3538- it ( "keeps a committed current-target run successful when its external route fails to resolve" , async ( ) => {
3539- const params = makeBaseParams ( {
3540- synthesizedText : "committed but undeliverable externally" ,
3541- sessionTarget : "current" ,
3542- runStartedAt : 1_500 ,
3543- } ) ;
3544- params . resolvedDelivery = {
3545- ok : false ,
3546- channel : "telegram" ,
3547- to : undefined ,
3548- accountId : undefined ,
3549- threadId : undefined ,
3550- mode : "implicit" ,
3551- error : new Error ( "Target is required" ) ,
3552- } ;
3538+ it . each ( [ "telegram" , "unavailable-plugin" ] ) (
3539+ "keeps a committed current-target run successful when its %s route fails to resolve" ,
3540+ async ( channel ) => {
3541+ const params = makeBaseParams ( {
3542+ synthesizedText : "committed but undeliverable externally" ,
3543+ sessionTarget : "current" ,
3544+ runStartedAt : 1_500 ,
3545+ } ) ;
3546+ params . resolvedDelivery = {
3547+ ok : false ,
3548+ channel,
3549+ to : undefined ,
3550+ accountId : undefined ,
3551+ threadId : undefined ,
3552+ mode : "implicit" ,
3553+ error : new Error ( "Target is required" ) ,
3554+ } ;
35533555
3554- const state = await dispatchCronDelivery ( params ) ;
3556+ const state = await dispatchCronDelivery ( params ) ;
35553557
3556- expect ( state . result ) . toBeUndefined ( ) ;
3557- expect ( state ) . toMatchObject ( {
3558- delivered : false ,
3559- deliveryAttempted : true ,
3560- deliveryError : "Target is required" ,
3561- } ) ;
3562- expect ( commitBackgroundResultToSessionMock ) . toHaveBeenCalledTimes ( 1 ) ;
3563- expect ( deliverOutboundPayloads ) . not . toHaveBeenCalled ( ) ;
3564- } ) ;
3558+ expect ( state . result ) . toBeUndefined ( ) ;
3559+ expect ( state ) . toMatchObject ( {
3560+ delivered : false ,
3561+ deliveryAttempted : true ,
3562+ deliveryError : "Target is required" ,
3563+ } ) ;
3564+ expect ( commitBackgroundResultToSessionMock ) . toHaveBeenCalledTimes ( 1 ) ;
3565+ expect ( deliverOutboundPayloads ) . not . toHaveBeenCalled ( ) ;
3566+ } ,
3567+ ) ;
35653568
35663569 it ( "requires the current-session commit in addition to one external delivery" , async ( ) => {
35673570 const params = makeBaseParams ( {
0 commit comments