From abc157f14cb8056c1f1dd765ba3fa2dc56d86526 Mon Sep 17 00:00:00 2001 From: Jack Pope Date: Wed, 6 Dec 2023 12:52:13 -0500 Subject: [PATCH] Add stable concurrent option to RTR --- .../__tests__/ReactCacheOld-test.internal.js | 14 +++--- .../ReactDevToolsHooksIntegration-test.js | 2 +- .../src/__tests__/inspectedElement-test.js | 12 ++--- .../__tests__/DebugTracing-test.internal.js | 18 +++---- ...rorBoundaryReconciliation-test.internal.js | 2 +- .../src/__tests__/ReactHooks-test.internal.js | 16 +++--- .../src/__tests__/ReactLazy-test.internal.js | 50 +++++++++---------- .../__tests__/ReactSuspense-test.internal.js | 26 +++++----- .../src/__tests__/StrictEffectsMode-test.js | 22 ++++---- .../src/ReactTestRenderer.js | 3 +- .../__tests__/ReactTestRendererAsync-test.js | 8 +-- .../__tests__/ReactProfiler-test.internal.js | 12 ++--- ...ofilerDevToolsIntegration-test.internal.js | 2 +- .../__tests__/ReactStartTransition-test.js | 2 +- .../src/__tests__/useSubscription-test.js | 18 +++---- 15 files changed, 104 insertions(+), 103 deletions(-) diff --git a/packages/react-cache/src/__tests__/ReactCacheOld-test.internal.js b/packages/react-cache/src/__tests__/ReactCacheOld-test.internal.js index 9463b72e14a69..2403d2de286b1 100644 --- a/packages/react-cache/src/__tests__/ReactCacheOld-test.internal.js +++ b/packages/react-cache/src/__tests__/ReactCacheOld-test.internal.js @@ -121,7 +121,7 @@ describe('ReactCache', () => { } ReactTestRenderer.create(, { - unstable_isConcurrent: true, + isConcurrent: true, }); await waitForAll(['Suspend! [Hi]', 'Loading...']); @@ -141,7 +141,7 @@ describe('ReactCache', () => { } const root = ReactTestRenderer.create(, { - unstable_isConcurrent: true, + isConcurrent: true, }); await waitForAll(['Suspend! [Hi]', 'Loading...']); @@ -181,7 +181,7 @@ describe('ReactCache', () => { , { - unstable_isConcurrent: true, + isConcurrent: true, }, ); @@ -210,7 +210,7 @@ describe('ReactCache', () => { , { - unstable_isConcurrent: true, + isConcurrent: true, }, ); await waitForAll(['Suspend! [1]', 'Loading...']); @@ -298,7 +298,7 @@ describe('ReactCache', () => { , { - unstable_isConcurrent: true, + isConcurrent: true, }, ); @@ -356,7 +356,7 @@ describe('ReactCache', () => { , { - unstable_isConcurrent: true, + isConcurrent: true, }, ); @@ -372,7 +372,7 @@ describe('ReactCache', () => { , { - unstable_isConcurrent: true, + isConcurrent: true, }, ); diff --git a/packages/react-debug-tools/src/__tests__/ReactDevToolsHooksIntegration-test.js b/packages/react-debug-tools/src/__tests__/ReactDevToolsHooksIntegration-test.js index 5da6b8de2a42e..eabcbd215bfb2 100644 --- a/packages/react-debug-tools/src/__tests__/ReactDevToolsHooksIntegration-test.js +++ b/packages/react-debug-tools/src/__tests__/ReactDevToolsHooksIntegration-test.js @@ -254,7 +254,7 @@ describe('React hooks DevTools integration', () => { , - {unstable_isConcurrent: true}, + {isConcurrent: true}, ), ); diff --git a/packages/react-devtools-shared/src/__tests__/inspectedElement-test.js b/packages/react-devtools-shared/src/__tests__/inspectedElement-test.js index 891e4f3e73834..cba7b3b2e7b61 100644 --- a/packages/react-devtools-shared/src/__tests__/inspectedElement-test.js +++ b/packages/react-devtools-shared/src/__tests__/inspectedElement-test.js @@ -75,7 +75,7 @@ describe('InspectedElement', () => { // Used by inspectElementAtIndex() helper function utils.act(() => { testRendererInstance = TestRenderer.create(null, { - unstable_isConcurrent: true, + isConcurrent: true, }); }); @@ -307,7 +307,7 @@ describe('InspectedElement', () => { ['An update to %s inside a test was not wrapped in act'], () => { testRendererInstance = TestRenderer.create(null, { - unstable_isConcurrent: true, + isConcurrent: true, }); }, ); @@ -469,7 +469,7 @@ describe('InspectedElement', () => { ['An update to %s inside a test was not wrapped in act'], () => { testRendererInstance = TestRenderer.create(null, { - unstable_isConcurrent: true, + isConcurrent: true, }); }, ); @@ -2034,7 +2034,7 @@ describe('InspectedElement', () => { ['An update to %s inside a test was not wrapped in act'], () => { testRendererInstance = TestRenderer.create(null, { - unstable_isConcurrent: true, + isConcurrent: true, }); }, ); @@ -2317,7 +2317,7 @@ describe('InspectedElement', () => { , - {unstable_isConcurrent: true}, + {isConcurrent: true}, ); }, false); await utils.actAsync(() => { @@ -2817,7 +2817,7 @@ describe('InspectedElement', () => { ['An update to %s inside a test was not wrapped in act'], () => { testRendererInstance = TestRenderer.create(null, { - unstable_isConcurrent: true, + isConcurrent: true, }); }, ); diff --git a/packages/react-reconciler/src/__tests__/DebugTracing-test.internal.js b/packages/react-reconciler/src/__tests__/DebugTracing-test.internal.js index f8026d6ea9fab..041086690e7fe 100644 --- a/packages/react-reconciler/src/__tests__/DebugTracing-test.internal.js +++ b/packages/react-reconciler/src/__tests__/DebugTracing-test.internal.js @@ -67,7 +67,7 @@ describe('DebugTracing', () => {
, - {unstable_isConcurrent: true}, + {isConcurrent: true}, ), ); expect(logs).toEqual([]); @@ -179,7 +179,7 @@ describe('DebugTracing', () => { , - {unstable_isConcurrent: true}, + {isConcurrent: true}, ), ); @@ -216,7 +216,7 @@ describe('DebugTracing', () => { , - {unstable_isConcurrent: true}, + {isConcurrent: true}, ), ); @@ -247,7 +247,7 @@ describe('DebugTracing', () => { , - {unstable_isConcurrent: true}, + {isConcurrent: true}, ), ); @@ -278,7 +278,7 @@ describe('DebugTracing', () => { , - {unstable_isConcurrent: true}, + {isConcurrent: true}, ), ); }).toErrorDev('Cannot update during an existing state transition'); @@ -305,7 +305,7 @@ describe('DebugTracing', () => { , - {unstable_isConcurrent: true}, + {isConcurrent: true}, ), ); @@ -333,7 +333,7 @@ describe('DebugTracing', () => { , - {unstable_isConcurrent: true}, + {isConcurrent: true}, ); }); expect(logs).toEqual([ @@ -358,7 +358,7 @@ describe('DebugTracing', () => { , - {unstable_isConcurrent: true}, + {isConcurrent: true}, ); }); @@ -381,7 +381,7 @@ describe('DebugTracing', () => { , - {unstable_isConcurrent: true}, + {isConcurrent: true}, ), ); diff --git a/packages/react-reconciler/src/__tests__/ErrorBoundaryReconciliation-test.internal.js b/packages/react-reconciler/src/__tests__/ErrorBoundaryReconciliation-test.internal.js index 71e047afc5ff6..0ce51699849b7 100644 --- a/packages/react-reconciler/src/__tests__/ErrorBoundaryReconciliation-test.internal.js +++ b/packages/react-reconciler/src/__tests__/ErrorBoundaryReconciliation-test.internal.js @@ -59,7 +59,7 @@ describe('ErrorBoundaryReconciliation', () => { , - {unstable_isConcurrent: isConcurrent}, + {isConcurrent: isConcurrent}, ); }); expect(renderer).toMatchRenderedOutput(); diff --git a/packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js b/packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js index 5f09cf997907c..5da503c8ca34d 100644 --- a/packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js +++ b/packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js @@ -86,7 +86,7 @@ describe('ReactHooks', () => { return ; } - const root = ReactTestRenderer.create(null, {unstable_isConcurrent: true}); + const root = ReactTestRenderer.create(null, {isConcurrent: true}); root.update(); await waitForAll(['Parent: 0, 0', 'Child: 0, 0', 'Effect: 0, 0']); expect(root).toMatchRenderedOutput('0, 0'); @@ -174,7 +174,7 @@ describe('ReactHooks', () => { Parent = memo(Parent); - const root = ReactTestRenderer.create(null, {unstable_isConcurrent: true}); + const root = ReactTestRenderer.create(null, {isConcurrent: true}); root.update(); await waitForAll(['Parent: 0, 0 (light)', 'Child: 0, 0 (light)']); expect(root).toMatchRenderedOutput('0, 0 (light)'); @@ -232,7 +232,7 @@ describe('ReactHooks', () => { return counter; } - const root = ReactTestRenderer.create(null, {unstable_isConcurrent: true}); + const root = ReactTestRenderer.create(null, {isConcurrent: true}); root.update(); await waitForAll(['Count: 0']); expect(root).toMatchRenderedOutput('0'); @@ -266,7 +266,7 @@ describe('ReactHooks', () => { return counter; } - const root = ReactTestRenderer.create(null, {unstable_isConcurrent: true}); + const root = ReactTestRenderer.create(null, {isConcurrent: true}); root.update(); await waitForAll(['Count: 0']); expect(root).toMatchRenderedOutput('0'); @@ -322,7 +322,7 @@ describe('ReactHooks', () => { }); return ; } - const root = ReactTestRenderer.create(null, {unstable_isConcurrent: true}); + const root = ReactTestRenderer.create(null, {isConcurrent: true}); await act(() => { root.update( @@ -390,7 +390,7 @@ describe('ReactHooks', () => { return ; } - const root = ReactTestRenderer.create(null, {unstable_isConcurrent: true}); + const root = ReactTestRenderer.create(null, {isConcurrent: true}); root.update(); await waitForAll(['Parent: 0', 'Child: 0', 'Effect: 0']); expect(root).toMatchRenderedOutput('0'); @@ -465,7 +465,7 @@ describe('ReactHooks', () => { return ; } - const root = ReactTestRenderer.create(null, {unstable_isConcurrent: true}); + const root = ReactTestRenderer.create(null, {isConcurrent: true}); root.update(); await waitForAll(['Parent: 0', 'Child: 0']); expect(root).toMatchRenderedOutput('0'); @@ -523,7 +523,7 @@ describe('ReactHooks', () => { return ; } - const root = ReactTestRenderer.create(null, {unstable_isConcurrent: true}); + const root = ReactTestRenderer.create(null, {isConcurrent: true}); root.update(); await waitForAll(['Parent: 1', 'Child: 1']); expect(root).toMatchRenderedOutput('1'); diff --git a/packages/react-reconciler/src/__tests__/ReactLazy-test.internal.js b/packages/react-reconciler/src/__tests__/ReactLazy-test.internal.js index a96c60bc26e88..36e956256dc60 100644 --- a/packages/react-reconciler/src/__tests__/ReactLazy-test.internal.js +++ b/packages/react-reconciler/src/__tests__/ReactLazy-test.internal.js @@ -99,7 +99,7 @@ describe('ReactLazy', () => { , { - unstable_isConcurrent: true, + isConcurrent: true, }, ); @@ -185,7 +185,7 @@ describe('ReactLazy', () => { , { - unstable_isConcurrent: true, + isConcurrent: true, }, ); @@ -208,7 +208,7 @@ describe('ReactLazy', () => { const LazyText = lazy(async () => Text); const root = ReactTestRenderer.create(null, { - unstable_isConcurrent: true, + isConcurrent: true, }); let error; @@ -242,7 +242,7 @@ describe('ReactLazy', () => { }); const root = ReactTestRenderer.create(null, { - unstable_isConcurrent: true, + isConcurrent: true, }); let error; @@ -302,7 +302,7 @@ describe('ReactLazy', () => { } const root = ReactTestRenderer.create(, { - unstable_isConcurrent: true, + isConcurrent: true, }); await waitForAll(['Suspend! [LazyChildA]', 'Loading...']); @@ -337,7 +337,7 @@ describe('ReactLazy', () => { , { - unstable_isConcurrent: true, + isConcurrent: true, }, ); @@ -394,7 +394,7 @@ describe('ReactLazy', () => { , { - unstable_isConcurrent: true, + isConcurrent: true, }, ); await waitForAll(['Loading...']); @@ -440,7 +440,7 @@ describe('ReactLazy', () => { , { - unstable_isConcurrent: true, + isConcurrent: true, }, ); await waitForAll(['Not lazy: 0', 'Loading...']); @@ -485,7 +485,7 @@ describe('ReactLazy', () => { , { - unstable_isConcurrent: true, + isConcurrent: true, }, ); await waitForAll(['Not lazy: 0', 'Loading...']); @@ -561,7 +561,7 @@ describe('ReactLazy', () => { , { - unstable_isConcurrent: true, + isConcurrent: true, }, ); @@ -691,7 +691,7 @@ describe('ReactLazy', () => { , { - unstable_isConcurrent: true, + isConcurrent: true, }, ); @@ -734,7 +734,7 @@ describe('ReactLazy', () => { , { - unstable_isConcurrent: true, + isConcurrent: true, }, ); @@ -761,7 +761,7 @@ describe('ReactLazy', () => { , { - unstable_isConcurrent: true, + isConcurrent: true, }, ); @@ -815,7 +815,7 @@ describe('ReactLazy', () => { , { - unstable_isConcurrent: true, + isConcurrent: true, }, ); @@ -1012,7 +1012,7 @@ describe('ReactLazy', () => { , { - unstable_isConcurrent: true, + isConcurrent: true, }, ); @@ -1055,7 +1055,7 @@ describe('ReactLazy', () => { , { - unstable_isConcurrent: true, + isConcurrent: true, }, ); @@ -1100,7 +1100,7 @@ describe('ReactLazy', () => { , { - unstable_isConcurrent: true, + isConcurrent: true, }, ); @@ -1131,7 +1131,7 @@ describe('ReactLazy', () => { , { - unstable_isConcurrent: true, + isConcurrent: true, }, ); await waitForAll(['Loading...']); @@ -1218,7 +1218,7 @@ describe('ReactLazy', () => { , { - unstable_isConcurrent: true, + isConcurrent: true, }, ); await waitForAll(['Loading...']); @@ -1264,7 +1264,7 @@ describe('ReactLazy', () => { , { - unstable_isConcurrent: true, + isConcurrent: true, }, ); @@ -1304,7 +1304,7 @@ describe('ReactLazy', () => { , - {unstable_isConcurrent: true}, + {isConcurrent: true}, ); await waitForAll(['Loading...']); @@ -1412,7 +1412,7 @@ describe('ReactLazy', () => { } const root = ReactTestRenderer.create(, { - unstable_isConcurrent: true, + isConcurrent: true, }); await waitForAll(['Init A', 'Loading...']); @@ -1497,7 +1497,7 @@ describe('ReactLazy', () => { } const root = ReactTestRenderer.create(, { - unstable_isConcurrent: false, + isConcurrent: false, }); assertLog(['Init A', 'Init B', 'Loading...']); @@ -1559,7 +1559,7 @@ describe('ReactLazy', () => { } const root = ReactTestRenderer.create(, { - unstable_isConcurrent: true, + isConcurrent: true, }); await waitForAll(['Init A', 'Loading...']); @@ -1628,7 +1628,7 @@ describe('ReactLazy', () => { } const root = ReactTestRenderer.create(, { - unstable_isConcurrent: false, + isConcurrent: false, }); assertLog(['Init A', 'Loading...']); diff --git a/packages/react-reconciler/src/__tests__/ReactSuspense-test.internal.js b/packages/react-reconciler/src/__tests__/ReactSuspense-test.internal.js index 6e347b900f655..4440f900294a7 100644 --- a/packages/react-reconciler/src/__tests__/ReactSuspense-test.internal.js +++ b/packages/react-reconciler/src/__tests__/ReactSuspense-test.internal.js @@ -117,7 +117,7 @@ describe('ReactSuspense', () => { // Render an empty shell const root = ReactTestRenderer.create(, { - unstable_isConcurrent: true, + isConcurrent: true, }); await waitForAll(['Foo']); @@ -158,7 +158,7 @@ describe('ReactSuspense', () => { , { - unstable_isConcurrent: true, + isConcurrent: true, }, ); @@ -217,7 +217,7 @@ describe('ReactSuspense', () => { , { - unstable_isConcurrent: true, + isConcurrent: true, }, ); await waitForAll(['Initial']); @@ -268,7 +268,7 @@ describe('ReactSuspense', () => { } const root = ReactTestRenderer.create(, { - unstable_isConcurrent: true, + isConcurrent: true, }); await waitForAll(['Foo', 'Suspend! [A]', 'Loading...']); @@ -303,7 +303,7 @@ describe('ReactSuspense', () => { } const root = ReactTestRenderer.create(, { - unstable_isConcurrent: true, + isConcurrent: true, }); await waitForAll(['Foo', 'Suspend! [A]', 'Loading...']); @@ -353,7 +353,7 @@ describe('ReactSuspense', () => { } const root = ReactTestRenderer.create(null, { - unstable_isConcurrent: true, + isConcurrent: true, }); root.update(); @@ -456,7 +456,7 @@ describe('ReactSuspense', () => { } const root = ReactTestRenderer.create(, { - unstable_isConcurrent: true, + isConcurrent: true, }); await waitForAll(['Suspend! [default]', 'Loading...']); @@ -502,7 +502,7 @@ describe('ReactSuspense', () => { } const root = ReactTestRenderer.create(, { - unstable_isConcurrent: true, + isConcurrent: true, }); await waitForAll(['Suspend! [default]', 'Loading...']); @@ -545,7 +545,7 @@ describe('ReactSuspense', () => { , { - unstable_isConcurrent: true, + isConcurrent: true, }, ); await waitForAll(['Suspend! [default]', 'Loading...']); @@ -589,7 +589,7 @@ describe('ReactSuspense', () => { , { - unstable_isConcurrent: true, + isConcurrent: true, }, ); await waitForAll(['Suspend! [default]', 'Loading...']); @@ -631,7 +631,7 @@ describe('ReactSuspense', () => { } const root = ReactTestRenderer.create(, { - unstable_isConcurrent: true, + isConcurrent: true, }); await waitForAll(['Child 1', 'create layout']); @@ -899,7 +899,7 @@ describe('ReactSuspense', () => { } const root = ReactTestRenderer.create(, { - unstable_isConcurrent: true, + isConcurrent: true, }); // Initial render @@ -990,7 +990,7 @@ describe('ReactSuspense', () => { } const root = ReactTestRenderer.create(, { - unstable_isConcurrent: true, + isConcurrent: true, }); await waitForAll(['Suspend! [Child 1]', 'Loading...']); diff --git a/packages/react-reconciler/src/__tests__/StrictEffectsMode-test.js b/packages/react-reconciler/src/__tests__/StrictEffectsMode-test.js index f7c30616c98c1..af35defe2325c 100644 --- a/packages/react-reconciler/src/__tests__/StrictEffectsMode-test.js +++ b/packages/react-reconciler/src/__tests__/StrictEffectsMode-test.js @@ -76,7 +76,7 @@ describe('StrictEffectsMode', () => { let renderer; await act(() => { renderer = ReactTestRenderer.create(, { - unstable_isConcurrent: true, + isConcurrent: true, }); }); @@ -129,7 +129,7 @@ describe('StrictEffectsMode', () => { let renderer; await act(() => { renderer = ReactTestRenderer.create(, { - unstable_isConcurrent: true, + isConcurrent: true, }); }); @@ -182,7 +182,7 @@ describe('StrictEffectsMode', () => { let renderer; await act(() => { renderer = ReactTestRenderer.create(, { - unstable_isConcurrent: true, + isConcurrent: true, }); }); @@ -233,7 +233,7 @@ describe('StrictEffectsMode', () => { let renderer; await act(() => { renderer = ReactTestRenderer.create(, { - unstable_isConcurrent: true, + isConcurrent: true, }); }); @@ -286,7 +286,7 @@ describe('StrictEffectsMode', () => { } await act(() => { - ReactTestRenderer.create(, {unstable_isConcurrent: true}); + ReactTestRenderer.create(, {isConcurrent: true}); }); if (supportsDoubleInvokeEffects()) { @@ -322,7 +322,7 @@ describe('StrictEffectsMode', () => { let renderer; await act(() => { renderer = ReactTestRenderer.create(, { - unstable_isConcurrent: true, + isConcurrent: true, }); }); @@ -367,7 +367,7 @@ describe('StrictEffectsMode', () => { let renderer; await act(() => { renderer = ReactTestRenderer.create(, { - unstable_isConcurrent: true, + isConcurrent: true, }); }); @@ -438,7 +438,7 @@ describe('StrictEffectsMode', () => { await act(() => { ReactTestRenderer.create(, { - unstable_isConcurrent: true, + isConcurrent: true, }); }); @@ -502,7 +502,7 @@ describe('StrictEffectsMode', () => { } await act(() => { - ReactTestRenderer.create(, {unstable_isConcurrent: true}); + ReactTestRenderer.create(, {isConcurrent: true}); }); if (supportsDoubleInvokeEffects()) { @@ -586,7 +586,7 @@ describe('StrictEffectsMode', () => { let renderer; await act(() => { renderer = ReactTestRenderer.create(, { - unstable_isConcurrent: true, + isConcurrent: true, }); }); @@ -667,7 +667,7 @@ describe('StrictEffectsMode', () => { let renderer; await act(() => { renderer = ReactTestRenderer.create(, { - unstable_isConcurrent: true, + isConcurrent: true, }); }); diff --git a/packages/react-test-renderer/src/ReactTestRenderer.js b/packages/react-test-renderer/src/ReactTestRenderer.js index 273bcd128f47c..17933d891f674 100644 --- a/packages/react-test-renderer/src/ReactTestRenderer.js +++ b/packages/react-test-renderer/src/ReactTestRenderer.js @@ -60,6 +60,7 @@ const act = React.unstable_act; type TestRendererOptions = { createNodeMock: (element: React$Element) => any, + isConcurrent: boolean, unstable_isConcurrent: boolean, unstable_strictMode: boolean, unstable_concurrentUpdatesByDefault: boolean, @@ -479,7 +480,7 @@ function create( // $FlowFixMe[incompatible-type] found when upgrading Flow createNodeMock = options.createNodeMock; } - if (options.unstable_isConcurrent === true) { + if (options.unstable_isConcurrent === true || options.isConcurrent === true) { isConcurrent = true; } if (options.unstable_strictMode === true) { diff --git a/packages/react-test-renderer/src/__tests__/ReactTestRendererAsync-test.js b/packages/react-test-renderer/src/__tests__/ReactTestRendererAsync-test.js index 468f62d39a722..51c7e0a950ddc 100644 --- a/packages/react-test-renderer/src/__tests__/ReactTestRendererAsync-test.js +++ b/packages/react-test-renderer/src/__tests__/ReactTestRendererAsync-test.js @@ -34,7 +34,7 @@ describe('ReactTestRendererAsync', () => { return props.children; } const renderer = ReactTestRenderer.create(Hi, { - unstable_isConcurrent: true, + isConcurrent: true, }); // Before flushing, nothing has mounted. @@ -68,7 +68,7 @@ describe('ReactTestRendererAsync', () => { ); } const renderer = ReactTestRenderer.create(, { - unstable_isConcurrent: true, + isConcurrent: true, }); await waitForAll(['A:1', 'B:1', 'C:1']); @@ -97,7 +97,7 @@ describe('ReactTestRendererAsync', () => { let renderer; React.startTransition(() => { renderer = ReactTestRenderer.create(, { - unstable_isConcurrent: true, + isConcurrent: true, }); }); @@ -137,7 +137,7 @@ describe('ReactTestRendererAsync', () => { let renderer; React.startTransition(() => { renderer = ReactTestRenderer.create(, { - unstable_isConcurrent: true, + isConcurrent: true, }); }); diff --git a/packages/react/src/__tests__/ReactProfiler-test.internal.js b/packages/react/src/__tests__/ReactProfiler-test.internal.js index 25386df33abcf..fd42561393101 100644 --- a/packages/react/src/__tests__/ReactProfiler-test.internal.js +++ b/packages/react/src/__tests__/ReactProfiler-test.internal.js @@ -213,7 +213,7 @@ describe(`onRender`, () => { , { - unstable_isConcurrent: true, + isConcurrent: true, }, ); }); @@ -752,7 +752,7 @@ describe(`onRender`, () => { , - {unstable_isConcurrent: true}, + {isConcurrent: true}, ); }); @@ -793,7 +793,7 @@ describe(`onRender`, () => { , - {unstable_isConcurrent: true}, + {isConcurrent: true}, ); }); @@ -844,7 +844,7 @@ describe(`onRender`, () => { , - {unstable_isConcurrent: true}, + {isConcurrent: true}, ); }); @@ -897,7 +897,7 @@ describe(`onRender`, () => { , - {unstable_isConcurrent: true}, + {isConcurrent: true}, ); // Render everything initially. @@ -1002,7 +1002,7 @@ describe(`onRender`, () => { , - {unstable_isConcurrent: true}, + {isConcurrent: true}, ); // Render everything initially. diff --git a/packages/react/src/__tests__/ReactProfilerDevToolsIntegration-test.internal.js b/packages/react/src/__tests__/ReactProfilerDevToolsIntegration-test.internal.js index d28e2ad8de64a..572abd354da63 100644 --- a/packages/react/src/__tests__/ReactProfilerDevToolsIntegration-test.internal.js +++ b/packages/react/src/__tests__/ReactProfilerDevToolsIntegration-test.internal.js @@ -150,7 +150,7 @@ describe('ReactProfiler DevTools integration', () => { return text; } - const root = ReactTestRenderer.create(null, {unstable_isConcurrent: true}); + const root = ReactTestRenderer.create(null, {isConcurrent: true}); // Commit something root.update(); diff --git a/packages/react/src/__tests__/ReactStartTransition-test.js b/packages/react/src/__tests__/ReactStartTransition-test.js index 9e689ac6e7105..c98372a7c74b7 100644 --- a/packages/react/src/__tests__/ReactStartTransition-test.js +++ b/packages/react/src/__tests__/ReactStartTransition-test.js @@ -49,7 +49,7 @@ describe('ReactStartTransition', () => { await act(() => { ReactTestRenderer.create(, { - unstable_isConcurrent: true, + isConcurrent: true, }); }); diff --git a/packages/use-subscription/src/__tests__/useSubscription-test.js b/packages/use-subscription/src/__tests__/useSubscription-test.js index 19eba0a15be8e..9c971bd14bbb3 100644 --- a/packages/use-subscription/src/__tests__/useSubscription-test.js +++ b/packages/use-subscription/src/__tests__/useSubscription-test.js @@ -84,7 +84,7 @@ describe('useSubscription', () => { await act(() => { renderer = ReactTestRenderer.create( , - {unstable_isConcurrent: true}, + {isConcurrent: true}, ); }); assertLog(['default']); @@ -136,7 +136,7 @@ describe('useSubscription', () => { await act(() => { renderer = ReactTestRenderer.create( , - {unstable_isConcurrent: true}, + {isConcurrent: true}, ); }); assertLog(['initial']); @@ -185,7 +185,7 @@ describe('useSubscription', () => { await act(() => { renderer = ReactTestRenderer.create( , - {unstable_isConcurrent: true}, + {isConcurrent: true}, ); }); @@ -244,7 +244,7 @@ describe('useSubscription', () => { await act(() => { renderer = ReactTestRenderer.create( , - {unstable_isConcurrent: true}, + {isConcurrent: true}, ); }); @@ -331,7 +331,7 @@ describe('useSubscription', () => { let renderer; await act(() => { renderer = ReactTestRenderer.create(, { - unstable_isConcurrent: true, + isConcurrent: true, }); }); assertLog(['Child: a-0', 'Grandchild: a-0']); @@ -434,7 +434,7 @@ describe('useSubscription', () => { let renderer; await act(() => { renderer = ReactTestRenderer.create(, { - unstable_isConcurrent: true, + isConcurrent: true, }); }); assertLog(['Child: a-0', 'Grandchild: a-0']); @@ -532,7 +532,7 @@ describe('useSubscription', () => { await act(() => { renderer = ReactTestRenderer.create( , - {unstable_isConcurrent: true}, + {isConcurrent: true}, ); }); assertLog([true]); @@ -566,7 +566,7 @@ describe('useSubscription', () => { await act(() => { renderer = ReactTestRenderer.create( , - {unstable_isConcurrent: true}, + {isConcurrent: true}, ); }); await waitForAll([]); @@ -607,7 +607,7 @@ describe('useSubscription', () => { , - {unstable_isConcurrent: true}, + {isConcurrent: true}, ); await waitForAll(['render:first:A', 'render:second:A']);