@@ -5,10 +5,12 @@ import { threadDetailBodyFingerprint } from "./thread-detail-body-fingerprint";
55
66function fingerprintWithResume (
77 onResumeQueue : ThreadDetailScreenProps [ "onResumeQueue" ] ,
8+ compactBeforeSend ?: ThreadDetailScreenProps [ "compactBeforeSend" ] ,
89) : readonly unknown [ ] {
9- // Partial fixture: this case only asserts Resume nullness remounts the body .
10+ // Partial fixture: only conditional controls are exercised .
1011 return threadDetailBodyFingerprint ( {
1112 onResumeQueue,
13+ compactBeforeSend,
1214 canStopThread : true ,
1315 selectedThread : {
1416 id : "thread" ,
@@ -32,11 +34,17 @@ function fingerprintWithResume(
3234}
3335
3436describe ( "threadDetailBodyFingerprint" , ( ) => {
35- it ( "changes when Resume becomes available or disappears " , ( ) => {
37+ it ( "changes when Resume or the compaction notice changes " , ( ) => {
3638 const hidden = fingerprintWithResume ( null ) ;
3739 const visible = fingerprintWithResume ( async ( ) => undefined ) ;
3840 expect ( hidden ) . not . toEqual ( visible ) ;
3941 expect ( fingerprintWithResume ( null ) ) . toEqual ( hidden ) ;
4042 expect ( fingerprintWithResume ( async ( ) => undefined ) ) . toEqual ( visible ) ;
43+ const notice = { tokens : 1000 , keepFullHistory : ( ) => undefined } ;
44+ expect ( fingerprintWithResume ( null , notice ) ) . not . toEqual ( hidden ) ;
45+ expect ( fingerprintWithResume ( null , { ...notice , tokens : 2000 } ) ) . not . toEqual (
46+ fingerprintWithResume ( null , notice ) ,
47+ ) ;
48+ expect ( fingerprintWithResume ( null , null ) ) . toEqual ( hidden ) ;
4149 } ) ;
4250} ) ;
0 commit comments