@@ -766,20 +766,39 @@ describeTelegramDispatch("dispatchTelegramMessage progress-updates", () => {
766766 } ,
767767 ) ;
768768
769- it ( "omits the durable commentary owner when Telegram commentary progress is disabled" , async ( ) => {
769+ it . each ( [
770+ {
771+ label : "progress commentary is disabled" ,
772+ streamMode : "progress" ,
773+ commentary : false ,
774+ commentaryPayloadsEnabled : true ,
775+ } ,
776+ {
777+ label : "partial streaming owns the answer preview" ,
778+ streamMode : "partial" ,
779+ commentary : true ,
780+ commentaryPayloadsEnabled : undefined ,
781+ } ,
782+ {
783+ label : "streaming is disabled" ,
784+ streamMode : "off" ,
785+ commentary : true ,
786+ commentaryPayloadsEnabled : undefined ,
787+ } ,
788+ ] as const ) ( "omits the durable commentary owner when $label" , async ( scenario ) => {
770789 dispatchReplyWithBufferedBlockDispatcher . mockImplementation ( async ( { replyOptions } ) => {
771- expect ( replyOptions ?. commentaryPayloadsEnabled ) . toBe ( true ) ;
790+ expect ( replyOptions ?. commentaryPayloadsEnabled ) . toBe ( scenario . commentaryPayloadsEnabled ) ;
772791 expect ( replyOptions ?. shouldDeliverCommentaryPayloads ) . toBeUndefined ( ) ;
773792 return { queuedFinal : false } ;
774793 } ) ;
775794
776795 await dispatchWithContext ( {
777796 context : createContext ( ) ,
778- streamMode : "progress" ,
797+ streamMode : scenario . streamMode ,
779798 telegramCfg : {
780799 streaming : {
781- mode : "progress" ,
782- progress : { label : "Shelling" } ,
800+ mode : scenario . streamMode ,
801+ progress : { label : "Shelling" , commentary : scenario . commentary } ,
783802 } ,
784803 } ,
785804 } ) ;
0 commit comments