Remove forceConcurrentByDefaultForTesting flag (#30436)
Concurrent by default has been unshipped! Let's clean it up. Here we remove `forceConcurrentByDefaultForTesting`, which allows us to run tests against both concurrent strategies. In the next PR, we'll remove the actual concurrent by default code path.
Jack Pope committed
Jul 24, 2024 at 10:17 UTC
e902c45caf7ca67810d3e53748a549bdcc36063b
20 files changed
+59
-365
packages/react-art/src/__tests__/ReactART-test.js
+1
-61
@@ -23,23 +23,15 @@ import Circle from 'react-art/Circle';
23
import Rectangle from 'react-art/Rectangle';
24
import Wedge from 'react-art/Wedge';
25
26
-const {act, waitFor} = require('internal-test-utils');
26
+const {act} = require('internal-test-utils');
27
28
// Isolate DOM renderer.
29
jest.resetModules();
30
// share isomorphic
31
jest.mock('scheduler', () => Scheduler);
32
jest.mock('react', () => React);
33
-const ReactDOM = require('react-dom');
33
const ReactDOMClient = require('react-dom/client');
34
36
-// Isolate the noop renderer
37
-jest.resetModules();
38
-// share isomorphic
39
-jest.mock('scheduler', () => Scheduler);
40
-jest.mock('react', () => React);
41
-const ReactNoop = require('react-noop-renderer');
42
-
35
let Group;
36
let Shape;
37
let Surface;
@@ -397,58 +389,6 @@ describe('ReactART', () => {
389
doClick(instance);
390
expect(onClick2).toBeCalled();
391
});
400
-
401
- // @gate forceConcurrentByDefaultForTesting
402
- it('can concurrently render with a "primary" renderer while sharing context', async () => {
403
- const CurrentRendererContext = React.createContext(null);
404
-
405
- function Yield(props) {
406
- Scheduler.log(props.value);
407
- return null;
408
- }
409
-
410
- let ops = [];
411
- function LogCurrentRenderer() {
412
- return (
413
- <CurrentRendererContext.Consumer>
414
- {currentRenderer => {
415
- ops.push(currentRenderer);
416
- return null;
417
- }}
418
- </CurrentRendererContext.Consumer>
419
- );
420
- }
421
-
422
- ReactNoop.render(
423
- <CurrentRendererContext.Provider value="Test">
424
- <Yield value="A" />
425
- <Yield value="B" />
426
- <LogCurrentRenderer />
427
- <Yield value="C" />
428
- </CurrentRendererContext.Provider>,
429
- );
430
-
431
- await waitFor(['A']);
432
-
433
- const root = ReactDOMClient.createRoot(container);
434
- // We use flush sync here because we expect this to render in between
435
- // while the concurrent render is yieldy where as act would flush both.
436
- ReactDOM.flushSync(() => {
437
- root.render(
438
- <Surface>
439
- <LogCurrentRenderer />
440
- <CurrentRendererContext.Provider value="ART">
441
- <LogCurrentRenderer />
442
- </CurrentRendererContext.Provider>
443
- </Surface>,
444
- );
445
- });
446
-
447
- ops = [];
448
- await waitFor(['B', 'C']);
449
-
450
- expect(ops).toEqual(['Test']);
451
- });
392
});
393
394
describe('ReactARTComponents', () => {
packages/react-dom/src/__tests__/ReactDOMNativeEventHeuristic-test.js
+1
-5
@@ -313,11 +313,7 @@ describe('ReactDOMNativeEventHeuristic-test', () => {
313
expect(container.textContent).toEqual('not hovered');
314
315
await waitFor(['hovered']);
316
- if (gate(flags => flags.forceConcurrentByDefaultForTesting)) {
317
- expect(container.textContent).toEqual('not hovered');
318
- } else {
319
- expect(container.textContent).toEqual('hovered');
320
- }
316
+ expect(container.textContent).toEqual('hovered');
317
});
318
expect(container.textContent).toEqual('hovered');
319
});
packages/react-dom/src/__tests__/ReactDOMServerPartialHydration-test.internal.js
+1
-8
@@ -2551,14 +2551,7 @@ describe('ReactDOMServerPartialHydration', () => {
2551
suspend = true;
2552
2553
await act(async () => {
2554
- if (gate(flags => flags.forceConcurrentByDefaultForTesting)) {
2555
- await waitFor(['Before']);
2556
- // This took a long time to render.
2557
- Scheduler.unstable_advanceTime(1000);
2558
- await waitFor(['After']);
2559
- } else {
2560
- await waitFor(['Before', 'After']);
2561
- }
2554
+ await waitFor(['Before', 'After']);
2555
2556
// This will cause us to skip the second row completely.
2557
});
packages/react-reconciler/src/ReactFiber.js
-6
@@ -31,7 +31,6 @@ import {
31
enableProfilerTimer,
32
enableScopeAPI,
33
enableLegacyHidden,
34
- forceConcurrentByDefaultForTesting,
34
allowConcurrentByDefault,
35
enableTransitionTracing,
36
enableDebugTracing,
@@ -534,11 +533,6 @@ export function createHostRootFiber(
533
mode |= StrictLegacyMode | StrictEffectsMode;
534
}
535
if (
537
- // We only use this flag for our repo tests to check both behaviors.
538
- forceConcurrentByDefaultForTesting
539
- ) {
540
- mode |= ConcurrentUpdatesByDefaultMode;
541
- } else if (
536
// Only for internal experiments.
537
allowConcurrentByDefault &&
538
concurrentUpdatesByDefaultOverride
packages/react-reconciler/src/__tests__/ReactExpiration-test.js
+43
-90
@@ -115,54 +115,28 @@ describe('ReactExpiration', () => {
115
}
116
}
117
118
- function flushNextRenderIfExpired() {
119
- // This will start rendering the next level of work. If the work hasn't
120
- // expired yet, React will exit without doing anything. If it has expired,
121
- // it will schedule a sync task.
122
- Scheduler.unstable_flushExpired();
123
- // Flush the sync task.
124
- ReactNoop.flushSync();
125
- }
126
-
118
it('increases priority of updates as time progresses', async () => {
128
- if (gate(flags => flags.forceConcurrentByDefaultForTesting)) {
129
- ReactNoop.render(<span prop="done" />);
130
- expect(ReactNoop).toMatchRenderedOutput(null);
131
-
132
- // Nothing has expired yet because time hasn't advanced.
133
- flushNextRenderIfExpired();
134
- expect(ReactNoop).toMatchRenderedOutput(null);
135
- // Advance time a bit, but not enough to expire the low pri update.
136
- ReactNoop.expire(4500);
137
- flushNextRenderIfExpired();
138
- expect(ReactNoop).toMatchRenderedOutput(null);
139
- // Advance by another second. Now the update should expire and flush.
140
- ReactNoop.expire(500);
141
- flushNextRenderIfExpired();
142
- expect(ReactNoop).toMatchRenderedOutput(<span prop="done" />);
143
- } else {
144
- ReactNoop.render(<Text text="Step 1" />);
145
- React.startTransition(() => {
146
- ReactNoop.render(<Text text="Step 2" />);
147
- });
148
- await waitFor(['Step 1']);
119
+ ReactNoop.render(<Text text="Step 1" />);
120
+ React.startTransition(() => {
121
+ ReactNoop.render(<Text text="Step 2" />);
122
+ });
123
+ await waitFor(['Step 1']);
124
150
- expect(ReactNoop).toMatchRenderedOutput('Step 1');
125
+ expect(ReactNoop).toMatchRenderedOutput('Step 1');
126
152
- // Nothing has expired yet because time hasn't advanced.
153
- await unstable_waitForExpired([]);
154
- expect(ReactNoop).toMatchRenderedOutput('Step 1');
127
+ // Nothing has expired yet because time hasn't advanced.
128
+ await unstable_waitForExpired([]);
129
+ expect(ReactNoop).toMatchRenderedOutput('Step 1');
130
156
- // Advance time a bit, but not enough to expire the low pri update.
157
- ReactNoop.expire(4500);
158
- await unstable_waitForExpired([]);
159
- expect(ReactNoop).toMatchRenderedOutput('Step 1');
131
+ // Advance time a bit, but not enough to expire the low pri update.
132
+ ReactNoop.expire(4500);
133
+ await unstable_waitForExpired([]);
134
+ expect(ReactNoop).toMatchRenderedOutput('Step 1');
135
161
- // Advance by a little bit more. Now the update should expire and flush.
162
- ReactNoop.expire(500);
163
- await unstable_waitForExpired(['Step 2']);
164
- expect(ReactNoop).toMatchRenderedOutput('Step 2');
165
- }
136
+ // Advance by a little bit more. Now the update should expire and flush.
137
+ ReactNoop.expire(500);
138
+ await unstable_waitForExpired(['Step 2']);
139
+ expect(ReactNoop).toMatchRenderedOutput('Step 2');
140
});
141
142
it('two updates of like priority in the same event always flush within the same batch', async () => {
@@ -408,57 +382,36 @@ describe('ReactExpiration', () => {
382
jest.resetModules();
383
Scheduler = require('scheduler');
384
411
- if (gate(flags => flags.forceConcurrentByDefaultForTesting)) {
412
- // Before importing the renderer, advance the current time by a number
413
- // larger than the maximum allowed for bitwise operations.
414
- const maxSigned31BitInt = 1073741823;
415
- Scheduler.unstable_advanceTime(maxSigned31BitInt * 100);
416
- // Now import the renderer. On module initialization, it will read the
417
- // current time.
418
- ReactNoop = require('react-noop-renderer');
419
- ReactNoop.render('Hi');
385
+ const InternalTestUtils = require('internal-test-utils');
386
+ waitFor = InternalTestUtils.waitFor;
387
+ assertLog = InternalTestUtils.assertLog;
388
+ unstable_waitForExpired = InternalTestUtils.unstable_waitForExpired;
389
421
- // The update should not have expired yet.
422
- flushNextRenderIfExpired();
423
- await waitFor([]);
424
- expect(ReactNoop).toMatchRenderedOutput(null);
425
- // Advance the time some more to expire the update.
426
- Scheduler.unstable_advanceTime(10000);
427
- flushNextRenderIfExpired();
428
- await waitFor([]);
429
- expect(ReactNoop).toMatchRenderedOutput('Hi');
430
- } else {
431
- const InternalTestUtils = require('internal-test-utils');
432
- waitFor = InternalTestUtils.waitFor;
433
- assertLog = InternalTestUtils.assertLog;
434
- unstable_waitForExpired = InternalTestUtils.unstable_waitForExpired;
435
-
436
- // Before importing the renderer, advance the current time by a number
437
- // larger than the maximum allowed for bitwise operations.
438
- const maxSigned31BitInt = 1073741823;
439
- Scheduler.unstable_advanceTime(maxSigned31BitInt * 100);
440
-
441
- // Now import the renderer. On module initialization, it will read the
442
- // current time.
443
- ReactNoop = require('react-noop-renderer');
444
- React = require('react');
445
-
446
- ReactNoop.render(<Text text="Step 1" />);
447
- React.startTransition(() => {
448
- ReactNoop.render(<Text text="Step 2" />);
449
- });
450
- await waitFor(['Step 1']);
390
+ // Before importing the renderer, advance the current time by a number
391
+ // larger than the maximum allowed for bitwise operations.
392
+ const maxSigned31BitInt = 1073741823;
393
+ Scheduler.unstable_advanceTime(maxSigned31BitInt * 100);
394
+
395
+ // Now import the renderer. On module initialization, it will read the
396
+ // current time.
397
+ ReactNoop = require('react-noop-renderer');
398
+ React = require('react');
399
+
400
+ ReactNoop.render(<Text text="Step 1" />);
401
+ React.startTransition(() => {
402
+ ReactNoop.render(<Text text="Step 2" />);
403
+ });
404
+ await waitFor(['Step 1']);
405
452
- // The update should not have expired yet.
453
- await unstable_waitForExpired([]);
406
+ // The update should not have expired yet.
407
+ await unstable_waitForExpired([]);
408
455
- expect(ReactNoop).toMatchRenderedOutput('Step 1');
409
+ expect(ReactNoop).toMatchRenderedOutput('Step 1');
410
457
- // Advance the time some more to expire the update.
458
- Scheduler.unstable_advanceTime(10000);
459
- await unstable_waitForExpired(['Step 2']);
460
- expect(ReactNoop).toMatchRenderedOutput('Step 2');
461
- }
411
+ // Advance the time some more to expire the update.
412
+ Scheduler.unstable_advanceTime(10000);
413
+ await unstable_waitForExpired(['Step 2']);
414
+ expect(ReactNoop).toMatchRenderedOutput('Step 2');
415
});
416
417
it('should measure callback timeout relative to current time, not start-up time', async () => {
packages/react-reconciler/src/__tests__/ReactHooksWithNoopRenderer-test.js
+9
-27
@@ -1540,39 +1540,21 @@ describe('ReactHooksWithNoopRenderer', () => {
1540
expect(ReactNoop).toMatchRenderedOutput(<span prop="Count: (empty)" />);
1541
1542
// Rendering again should flush the previous commit's effects
1543
- if (gate(flags => flags.forceConcurrentByDefaultForTesting)) {
1543
+ React.startTransition(() => {
1544
ReactNoop.render(<Counter count={1} />, () =>
1545
Scheduler.log('Sync effect'),
1546
);
1547
- } else {
1548
- React.startTransition(() => {
1549
- ReactNoop.render(<Counter count={1} />, () =>
1550
- Scheduler.log('Sync effect'),
1551
- );
1552
- });
1553
- }
1547
+ });
1548
1549
await waitFor(['Schedule update [0]', 'Count: 0']);
1550
1557
- if (gate(flags => flags.forceConcurrentByDefaultForTesting)) {
1558
- expect(ReactNoop).toMatchRenderedOutput(
1559
- <span prop="Count: (empty)" />,
1560
- );
1561
- await waitFor(['Sync effect']);
1562
- expect(ReactNoop).toMatchRenderedOutput(<span prop="Count: 0" />);
1563
-
1564
- ReactNoop.flushPassiveEffects();
1565
- assertLog(['Schedule update [1]']);
1566
- await waitForAll(['Count: 1']);
1567
- } else {
1568
- expect(ReactNoop).toMatchRenderedOutput(<span prop="Count: 0" />);
1569
- await waitFor([
1570
- 'Count: 0',
1571
- 'Sync effect',
1572
- 'Schedule update [1]',
1573
- 'Count: 1',
1574
- ]);
1575
- }
1551
+ expect(ReactNoop).toMatchRenderedOutput(<span prop="Count: 0" />);
1552
+ await waitFor([
1553
+ 'Count: 0',
1554
+ 'Sync effect',
1555
+ 'Schedule update [1]',
1556
+ 'Count: 1',
1557
+ ]);
1558
1559
expect(ReactNoop).toMatchRenderedOutput(<span prop="Count: 1" />);
1560
});
packages/react-reconciler/src/__tests__/ReactInterleavedUpdates-test.js
-55
@@ -86,61 +86,6 @@ describe('ReactInterleavedUpdates', () => {
86
expect(root).toMatchRenderedOutput('222');
87
});
88
89
- // @gate forceConcurrentByDefaultForTesting
90
- it('low priority update during an interleaved event is not processed during the current render', async () => {
91
- // Same as previous test, but the interleaved update is lower priority than
92
- // the in-progress render.
93
- const updaters = [];
94
-
95
- function Child() {
96
- const [state, setState] = useState(0);
97
- useEffect(() => {
98
- updaters.push(setState);
99
- }, []);
100
- return <Text text={state} />;
101
- }
102
-
103
- function updateChildren(value) {
104
- for (let i = 0; i < updaters.length; i++) {
105
- const setState = updaters[i];
106
- setState(value);
107
- }
108
- }
109
-
110
- const root = ReactNoop.createRoot();
111
-
112
- await act(async () => {
113
- root.render(
114
- <>
115
- <Child />
116
- <Child />
117
- <Child />
118
- </>,
119
- );
120
- });
121
- assertLog([0, 0, 0]);
122
- expect(root).toMatchRenderedOutput('000');
123
-
124
- await act(async () => {
125
- updateChildren(1);
126
- // Partially render the children. Only the first one.
127
- await waitFor([1]);
128
-
129
- // In an interleaved event, schedule an update on each of the children.
130
- // Including the two that haven't rendered yet.
131
- startTransition(() => {
132
- updateChildren(2);
133
- });
134
-
135
- // We should continue rendering without including the interleaved updates.
136
- await waitForPaint([1, 1]);
137
- expect(root).toMatchRenderedOutput('111');
138
- });
139
- // The interleaved updates flush in a separate render.
140
- assertLog([2, 2, 2]);
141
- expect(root).toMatchRenderedOutput('222');
142
- });
143
-
89
it('regression for #24350: does not add to main update queue until interleaved update queue has been cleared', async () => {
90
let setStep;
91
function App() {
packages/react-reconciler/src/__tests__/ReactSuspense-test.internal.js
-68
@@ -378,74 +378,6 @@ describe('ReactSuspense', () => {
378
expect(container.textContent).toEqual('AB');
379
});
380
381
- // @gate !disableLegacyMode && forceConcurrentByDefaultForTesting
382
- it(
383
- 'interrupts current render when something suspends with a ' +
384
- "delay and we've already skipped over a lower priority update in " +
385
- 'a parent',
386
- async () => {
387
- const root = ReactDOMClient.createRoot(container);
388
-
389
- function interrupt() {
390
- // React has a heuristic to batch all updates that occur within the same
391
- // event. This is a trick to circumvent that heuristic.
392
- ReactDOM.render('whatever', document.createElement('div'));
393
- }
394
-
395
- function App({shouldSuspend, step}) {
396
- return (
397
- <>
398
- <Text text={`A${step}`} />
399
- <Suspense fallback={<Text text="Loading..." />}>
400
- {shouldSuspend ? <AsyncText text="Async" /> : null}
401
- </Suspense>
402
- <Text text={`B${step}`} />
403
- <Text text={`C${step}`} />
404
- </>
405
- );
406
- }
407
-
408
- root.render(<App shouldSuspend={false} step={0} />);
409
- await waitForAll(['A0', 'B0', 'C0']);
410
- expect(container.textContent).toEqual('A0B0C0');
411
-
412
- // This update will suspend.
413
- root.render(<App shouldSuspend={true} step={1} />);
414
-
415
- // Do a bit of work
416
- await waitFor(['A1']);
417
-
418
- // Schedule another update. This will have lower priority because it's
419
- // a transition.
420
- React.startTransition(() => {
421
- root.render(<App shouldSuspend={false} step={2} />);
422
- });
423
-
424
- // Interrupt to trigger a restart.
425
- interrupt();
426
-
427
- await waitFor([
428
- // Should have restarted the first update, because of the interruption
429
- 'A1',
430
- 'Suspend! [Async]',
431
- 'Loading...',
432
- 'B1',
433
- ]);
434
-
435
- // Should not have committed loading state
436
- expect(container.textContent).toEqual('A0B0C0');
437
-
438
- // After suspending, should abort the first update and switch to the
439
- // second update. So, C1 should not appear in the log.
440
- // TODO: This should work even if React does not yield to the main
441
- // thread. Should use same mechanism as selective hydration to interrupt
442
- // the render before the end of the current slice of work.
443
- await waitForAll(['A2', 'B2', 'C2']);
444
-
445
- expect(container.textContent).toEqual('A2B2C2');
446
- },
447
- );
448
-
381
// @gate !disableLegacyMode
382
it('mounts a lazy class component in non-concurrent mode (legacy)', async () => {
383
class Class extends React.Component {
packages/react-reconciler/src/__tests__/ReactSuspenseWithNoopRenderer-test.js
+4
-17
@@ -2234,27 +2234,14 @@ describe('ReactSuspenseWithNoopRenderer', () => {
2234
await waitForAll(['Foo', 'A']);
2235
expect(ReactNoop).toMatchRenderedOutput(<span prop="A" />);
2236
2237
- if (gate(flags => flags.forceConcurrentByDefaultForTesting)) {
2237
+ React.startTransition(() => {
2238
ReactNoop.render(<Foo showB={true} />);
2239
- } else {
2240
- React.startTransition(() => {
2241
- ReactNoop.render(<Foo showB={true} />);
2242
- });
2243
- }
2239
+ });
2240
2241
await waitForAll(['Foo', 'A', 'Suspend! [B]', 'Loading B...']);
2242
2247
- if (gate(flags => flags.forceConcurrentByDefaultForTesting)) {
2248
- expect(ReactNoop).toMatchRenderedOutput(
2249
- <>
2250
- <span prop="A" />
2251
- <span prop="Loading B..." />
2252
- </>,
2253
- );
2254
- } else {
2255
- // Transitions never fall back.
2256
- expect(ReactNoop).toMatchRenderedOutput(<span prop="A" />);
2257
- }
2243
+ // Transitions never fall back.
2244
+ expect(ReactNoop).toMatchRenderedOutput(<span prop="A" />);
2245
});
2246
2247
// @gate enableLegacyCache
packages/react-reconciler/src/__tests__/ReactUse-test.js
-2
@@ -1656,7 +1656,6 @@ describe('ReactUse', () => {
1656
expect(root).toMatchRenderedOutput('C');
1657
});
1658
1659
- // @gate !forceConcurrentByDefaultForTesting
1659
it('an async component outside of a Suspense boundary crashes with an error (resolves in microtask)', async () => {
1660
class ErrorBoundary extends React.Component {
1661
state = {error: null};
@@ -1708,7 +1707,6 @@ describe('ReactUse', () => {
1707
);
1708
});
1709
1711
- // @gate !forceConcurrentByDefaultForTesting
1710
it('an async component outside of a Suspense boundary crashes with an error (resolves in macrotask)', async () => {
1711
class ErrorBoundary extends React.Component {
1712
state = {error: null};
packages/react/src/__tests__/ReactProfiler-test.internal.js
-12
@@ -170,17 +170,6 @@ describe(`onRender`, () => {
170
'read current time',
171
'read current time',
172
]);
173
- } else if (gate(flags => !flags.allowConcurrentByDefault)) {
174
- assertLog([
175
- 'read current time',
176
- 'read current time',
177
- 'read current time',
178
- 'read current time',
179
- 'read current time',
180
- 'read current time',
181
- 'read current time',
182
- // TODO: why is there one less in this case?
183
- ]);
173
} else {
174
assertLog([
175
'read current time',
@@ -190,7 +179,6 @@ describe(`onRender`, () => {
179
'read current time',
180
'read current time',
181
'read current time',
193
- 'read current time',
182
]);
183
}
184
});
packages/shared/ReactFeatureFlags.js
-3
@@ -217,9 +217,6 @@ export const enableUseDeferredValueInitialArg = true;
217
// when we plan to enable them.
218
// -----------------------------------------------------------------------------
219
220
-// Enables time slicing for updates that aren't wrapped in startTransition.
221
-export const forceConcurrentByDefaultForTesting = false;
222
-
220
// Adds an opt-in to time slicing for updates that aren't wrapped in startTransition.
221
export const allowConcurrentByDefault = false;
222
packages/shared/forks/ReactFeatureFlags.native-fb.js
-1
@@ -85,7 +85,6 @@ export const enableUseDeferredValueInitialArg = true;
85
export const enableUseEffectEventHook = false;
86
export const enableUseMemoCacheHook = true;
87
export const favorSafetyOverHydrationPerf = true;
88
-export const forceConcurrentByDefaultForTesting = false;
88
export const renameElementSymbol = false;
89
export const retryLaneExpirationMs = 5000;
90
export const syncLaneExpirationMs = 250;
packages/shared/forks/ReactFeatureFlags.native-oss.js
-1
@@ -76,7 +76,6 @@ export const enableUseDeferredValueInitialArg = true;
76
export const enableUseEffectEventHook = false;
77
export const enableUseMemoCacheHook = true;
78
export const favorSafetyOverHydrationPerf = true;
79
-export const forceConcurrentByDefaultForTesting = false;
79
export const passChildrenWhenCloningPersistedNodes = false;
80
export const renameElementSymbol = true;
81
export const retryLaneExpirationMs = 5000;
packages/shared/forks/ReactFeatureFlags.test-renderer.js
-1
@@ -53,7 +53,6 @@ export const transitionLaneExpirationMs = 5000;
53
export const disableSchedulerTimeoutInWorkLoop = false;
54
export const enableLazyContextPropagation = false;
55
export const enableLegacyHidden = false;
56
-export const forceConcurrentByDefaultForTesting = false;
56
export const allowConcurrentByDefault = false;
57
58
export const consoleManagedByDevToolsDuringStrictMode = false;
packages/shared/forks/ReactFeatureFlags.test-renderer.native-fb.js
-1
@@ -72,7 +72,6 @@ export const enableUseDeferredValueInitialArg = true;
72
export const enableUseEffectEventHook = false;
73
export const enableUseMemoCacheHook = true;
74
export const favorSafetyOverHydrationPerf = true;
75
-export const forceConcurrentByDefaultForTesting = false;
75
export const passChildrenWhenCloningPersistedNodes = false;
76
export const renameElementSymbol = false;
77
export const retryLaneExpirationMs = 5000;
packages/shared/forks/ReactFeatureFlags.test-renderer.www.js
-1
@@ -56,7 +56,6 @@ export const transitionLaneExpirationMs = 5000;
56
export const disableSchedulerTimeoutInWorkLoop = false;
57
export const enableLazyContextPropagation = false;
58
export const enableLegacyHidden = false;
59
-export const forceConcurrentByDefaultForTesting = false;
59
export const allowConcurrentByDefault = true;
60
61
export const consoleManagedByDevToolsDuringStrictMode = false;
packages/shared/forks/ReactFeatureFlags.www-dynamic.js
-1
@@ -29,7 +29,6 @@ export const enableRetryLaneExpiration = __VARIANT__;
29
export const enableTransitionTracing = __VARIANT__;
30
export const enableUseDeferredValueInitialArg = __VARIANT__;
31
export const favorSafetyOverHydrationPerf = __VARIANT__;
32
-export const forceConcurrentByDefaultForTesting = __VARIANT__;
32
export const renameElementSymbol = __VARIANT__;
33
export const retryLaneExpirationMs = 5000;
34
export const syncLaneExpirationMs = 250;
packages/shared/forks/ReactFeatureFlags.www.js
-2
@@ -102,8 +102,6 @@ export const consoleManagedByDevToolsDuringStrictMode = true;
102
103
export const enableFizzExternalRuntime = true;
104
105
-export const forceConcurrentByDefaultForTesting = false;
106
-
105
export const passChildrenWhenCloningPersistedNodes = false;
106
107
export const enableAsyncDebugInfo = false;
scripts/jest/setupTests.www.js
-3
@@ -8,9 +8,6 @@ jest.mock('shared/ReactFeatureFlags', () => {
8
);
9
const actual = jest.requireActual('shared/forks/ReactFeatureFlags.www');
10
11
- // This flag is only used by tests, it should never be set elsewhere.
12
- actual.forceConcurrentByDefaultForTesting = !__VARIANT__;
13
-
11
// Flags that aren't currently used, but we still want to force variants to keep the
12
// code live.
13
actual.disableInputAttributeSyncing = __VARIANT__;