@@ -5,7 +5,7 @@ let Scheduler;
5
5
let act ;
6
6
let waitFor ;
7
7
let waitForAll ;
8
- let unstable_waitForExpired ;
8
+ let waitForMicrotasks ;
9
9
let assertLog ;
10
10
let waitForPaint ;
11
11
let Suspense ;
@@ -30,7 +30,7 @@ describe('ReactSuspenseWithNoopRenderer', () => {
30
30
waitFor = InternalTestUtils . waitFor ;
31
31
waitForAll = InternalTestUtils . waitForAll ;
32
32
waitForPaint = InternalTestUtils . waitForPaint ;
33
- unstable_waitForExpired = InternalTestUtils . unstable_waitForExpired ;
33
+ waitForMicrotasks = InternalTestUtils . waitForMicrotasks ;
34
34
assertLog = InternalTestUtils . assertLog ;
35
35
36
36
getCacheForType = React . unstable_getCacheForType ;
@@ -4011,8 +4011,7 @@ describe('ReactSuspenseWithNoopRenderer', () => {
4011
4011
} ,
4012
4012
) ;
4013
4013
4014
- // @gate enableLegacyCache
4015
- // @gate enableRetryLaneExpiration
4014
+ // @gate enableLegacyCache && enableRetryLaneExpiration
4016
4015
it ( 'recurring updates in siblings should not block expensive content in suspense boundary from committing' , async ( ) => {
4017
4016
const { useState} = React ;
4018
4017
@@ -4062,14 +4061,14 @@ describe('ReactSuspenseWithNoopRenderer', () => {
4062
4061
) ;
4063
4062
4064
4063
await waitFor ( [ 'Async' , 'A' , 'B' ] ) ;
4065
- ReactNoop . expire ( 10000000 ) ;
4066
- await advanceTimers ( 10000000 ) ;
4064
+ ReactNoop . expire ( 100000 ) ;
4065
+ await advanceTimers ( 100000 ) ;
4067
4066
setText ( '2' ) ;
4068
4067
await waitForPaint ( [ '2' ] ) ;
4069
4068
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' ] ) ;
4073
4072
4074
4073
expect ( root ) . toMatchRenderedOutput (
4075
4074
< >
0 commit comments