File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import {
22 boundAttachmentIds ,
3+ buildExpiredTerminalContextToastCopy ,
34 mergeDirectPreviewAnnotation ,
45 planComposerTurn ,
56 snapshotComposerSend ,
@@ -127,6 +128,22 @@ describe("deriveComposerSendState", () => {
127128 } ) ;
128129} ) ;
129130
131+ describe ( "buildExpiredTerminalContextToastCopy" , ( ) => {
132+ it ( "refers to several expired contexts as them" , ( ) => {
133+ expect ( buildExpiredTerminalContextToastCopy ( 2 , "empty" ) ) . toEqual ( {
134+ title : "Expired terminal contexts won't be sent" ,
135+ description : "Remove them or re-add them to include terminal output." ,
136+ } ) ;
137+ expect ( buildExpiredTerminalContextToastCopy ( 2 , "omitted" ) ) . toEqual ( {
138+ title : "Expired terminal contexts omitted from message" ,
139+ description : "Re-add them if you want that terminal output included." ,
140+ } ) ;
141+ expect ( buildExpiredTerminalContextToastCopy ( 1 , "omitted" ) . description ) . toBe (
142+ "Re-add it if you want that terminal output included." ,
143+ ) ;
144+ } ) ;
145+ } ) ;
146+
130147describe ( "hasServerAcknowledgedLocalDispatch" , ( ) => {
131148 it ( "acknowledges a settled newer background turn" , ( ) => {
132149 const localDispatch = createLocalDispatchSnapshot (
Original file line number Diff line number Diff line change @@ -782,15 +782,16 @@ export function buildExpiredTerminalContextToastCopy(
782782) : { title : string ; description : string } {
783783 const count = Math . max ( 1 , Math . floor ( expiredTerminalContextCount ) ) ;
784784 const noun = count === 1 ? "Expired terminal context" : "Expired terminal contexts" ;
785+ const pronoun = count === 1 ? "it" : "them" ;
785786 if ( variant === "empty" ) {
786787 return {
787788 title : `${ noun } won't be sent` ,
788- description : " Remove it or re-add it to include terminal output." ,
789+ description : ` Remove ${ pronoun } or re-add ${ pronoun } to include terminal output.` ,
789790 } ;
790791 }
791792 return {
792793 title : `${ noun } omitted from message` ,
793- description : " Re-add it if you want that terminal output included." ,
794+ description : ` Re-add ${ pronoun } if you want that terminal output included.` ,
794795 } ;
795796}
796797
You can’t perform that action at this time.
0 commit comments