@@ -1043,15 +1043,16 @@ describe("resolveThreadSwitchTimeline", () => {
10431043
10441044 const held = { threadKey : "env-1:thread-a" , entries : [ "a1" , "a2" ] } ;
10451045
1046- it ( "keeps the previous thread's entries while the next thread is loading" , ( ) => {
1046+ it ( "leaves an uncached destination empty while its history loads" , ( ) => {
1047+ rememberReadyThreadTimeline ( held ) ;
10471048 expect (
10481049 resolveThreadSwitchTimeline ( {
10491050 loading : true ,
10501051 activeThreadKey : "env-1:thread-b" ,
10511052 nextEntries : [ ] ,
10521053 lastReady : held ,
10531054 } ) ,
1054- ) . toEqual ( { entries : [ "a1" , "a2" ] , displayThreadKey : "env-1:thread-a " } ) ;
1055+ ) . toEqual ( { entries : [ ] , displayThreadKey : "env-1:thread-b " } ) ;
10551056 } ) ;
10561057
10571058 it ( "shows the new thread once its detail is ready" , ( ) => {
@@ -1089,18 +1090,6 @@ describe("resolveThreadSwitchTimeline", () => {
10891090 } ) ;
10901091 } ) ;
10911092
1092- it ( "survives a ChatView remount by remembering the last ready timeline" , ( ) => {
1093- rememberReadyThreadTimeline ( held ) ;
1094- expect ( peekHeldThreadTimeline < string [ ] > ( ) ) . toEqual ( held ) ;
1095- expect (
1096- resolveThreadSwitchTimeline ( {
1097- loading : true ,
1098- activeThreadKey : "env-1:thread-b" ,
1099- nextEntries : [ ] ,
1100- } ) ,
1101- ) . toEqual ( { entries : [ "a1" , "a2" ] , displayThreadKey : "env-1:thread-a" } ) ;
1102- } ) ;
1103-
11041093 it ( "paints a remembered destination instead of the last-viewed thread" , ( ) => {
11051094 rememberReadyThreadTimeline ( held ) ;
11061095 rememberReadyThreadTimeline ( { threadKey : "env-1:thread-b" , entries : [ "b1" , "b2" ] } ) ;
0 commit comments