@@ -5,7 +5,7 @@ let Scheduler;
55let act ;
66let waitFor ;
77let waitForAll ;
8- let unstable_waitForExpired ;
8+ let waitForMicrotasks ;
99let assertLog ;
1010let waitForPaint ;
1111let Suspense ;
@@ -30,7 +30,7 @@ describe('ReactSuspenseWithNoopRenderer', () => {
3030 waitFor = InternalTestUtils . waitFor ;
3131 waitForAll = InternalTestUtils . waitForAll ;
3232 waitForPaint = InternalTestUtils . waitForPaint ;
33- unstable_waitForExpired = InternalTestUtils . unstable_waitForExpired ;
33+ waitForMicrotasks = InternalTestUtils . waitForMicrotasks ;
3434 assertLog = InternalTestUtils . assertLog ;
3535
3636 getCacheForType = React . unstable_getCacheForType ;
@@ -4011,8 +4011,7 @@ describe('ReactSuspenseWithNoopRenderer', () => {
40114011 } ,
40124012 ) ;
40134013
4014- // @gate enableLegacyCache
4015- // @gate enableRetryLaneExpiration
4014+ // @gate enableLegacyCache && enableRetryLaneExpiration
40164015 it ( 'recurring updates in siblings should not block expensive content in suspense boundary from committing' , async ( ) => {
40174016 const { useState} = React ;
40184017
@@ -4062,14 +4061,14 @@ describe('ReactSuspenseWithNoopRenderer', () => {
40624061 ) ;
40634062
40644063 await waitFor ( [ 'Async' , 'A' , 'B' ] ) ;
4065- ReactNoop . expire ( 10000000 ) ;
4066- await advanceTimers ( 10000000 ) ;
4064+ ReactNoop . expire ( 100000 ) ;
4065+ await advanceTimers ( 100000 ) ;
40674066 setText ( '2' ) ;
40684067 await waitForPaint ( [ '2' ] ) ;
40694068
4070- ReactNoop . expire ( 10000000 ) ;
4071- await advanceTimers ( 10000000 ) ;
4072- await unstable_waitForExpired ( [ 'Async' , 'A' , 'B' , 'C' ] ) ;
4069+ await waitForMicrotasks ( ) ;
4070+ Scheduler . unstable_flushNumberOfYields ( 1 ) ;
4071+ assertLog ( [ 'Async' , 'A' , 'B' , 'C' ] ) ;
40734072
40744073 expect ( root ) . toMatchRenderedOutput (
40754074 < >
0 commit comments