Skip to content

Commit f04d179

Browse files
committed
Make regression test fail on base
1 parent 23e50e8 commit f04d179

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

packages/react-reconciler/src/__tests__/ReactSuspenseWithNoopRenderer-test.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ let Scheduler;
55
let act;
66
let waitFor;
77
let waitForAll;
8-
let unstable_waitForExpired;
8+
let waitForMicrotasks;
99
let assertLog;
1010
let waitForPaint;
1111
let 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

Comments
 (0)