Skip to content

Commit

Permalink
Flip default to concurrent render in RTR
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack Pope committed Mar 5, 2024
1 parent ffbb71e commit b81de30
Show file tree
Hide file tree
Showing 23 changed files with 475 additions and 300 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ describe('React hooks DevTools integration', () => {
<MyComponent />
</React.Suspense>
</div>,
{isConcurrent: true},
{unstable_isConcurrent: true},
),
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ describe('InspectedElement', () => {
// Used by inspectElementAtIndex() helper function
utils.act(() => {
testRendererInstance = TestRenderer.create(null, {
isConcurrent: true,
unstable_isConcurrent: true,
});
});

Expand Down Expand Up @@ -356,7 +356,7 @@ describe('InspectedElement', () => {
['An update to %s inside a test was not wrapped in act'],
() => {
testRendererInstance = TestRenderer.create(null, {
isConcurrent: true,
unstable_isConcurrent: true,
});
},
);
Expand Down Expand Up @@ -506,7 +506,7 @@ describe('InspectedElement', () => {
['An update to %s inside a test was not wrapped in act'],
() => {
testRendererInstance = TestRenderer.create(null, {
isConcurrent: true,
unstable_isConcurrent: true,
});
},
);
Expand Down Expand Up @@ -2063,7 +2063,7 @@ describe('InspectedElement', () => {
['An update to %s inside a test was not wrapped in act'],
() => {
testRendererInstance = TestRenderer.create(null, {
isConcurrent: true,
unstable_isConcurrent: true,
});
},
);
Expand Down Expand Up @@ -2123,7 +2123,7 @@ describe('InspectedElement', () => {
['An update to %s inside a test was not wrapped in act'],
() => {
testRendererInstance = TestRenderer.create(null, {
isConcurrent: true,
unstable_isConcurrent: true,
});
},
);
Expand Down Expand Up @@ -2399,7 +2399,7 @@ describe('InspectedElement', () => {
<Suspender target={id} />
</React.Suspense>
</Contexts>,
{isConcurrent: true},
{unstable_isConcurrent: true},
);
}, false);
await utils.actAsync(() => {
Expand Down Expand Up @@ -2937,7 +2937,7 @@ describe('InspectedElement', () => {
['An update to %s inside a test was not wrapped in act'],
() => {
testRendererInstance = TestRenderer.create(null, {
isConcurrent: true,
unstable_isConcurrent: true,
});
},
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe('DebugTracing', () => {
<React.unstable_DebugTracingMode>
<div />
</React.unstable_DebugTracingMode>,
{isConcurrent: true},
{unstable_isConcurrent: true},
),
);
expect(logs).toEqual([]);
Expand Down Expand Up @@ -179,7 +179,7 @@ describe('DebugTracing', () => {
<Example />
</React.Suspense>
</React.unstable_DebugTracingMode>,
{isConcurrent: true},
{unstable_isConcurrent: true},
),
);

Expand Down Expand Up @@ -216,7 +216,7 @@ describe('DebugTracing', () => {
</React.Suspense>
</Wrapper>
</React.unstable_DebugTracingMode>,
{isConcurrent: true},
{unstable_isConcurrent: true},
),
);

Expand Down Expand Up @@ -247,7 +247,7 @@ describe('DebugTracing', () => {
<React.unstable_DebugTracingMode>
<Example />
</React.unstable_DebugTracingMode>,
{isConcurrent: true},
{unstable_isConcurrent: true},
),
);

Expand Down Expand Up @@ -278,7 +278,7 @@ describe('DebugTracing', () => {
<React.unstable_DebugTracingMode>
<Example />
</React.unstable_DebugTracingMode>,
{isConcurrent: true},
{unstable_isConcurrent: true},
),
);
}).toErrorDev('Cannot update during an existing state transition');
Expand All @@ -305,7 +305,7 @@ describe('DebugTracing', () => {
<React.unstable_DebugTracingMode>
<Example />
</React.unstable_DebugTracingMode>,
{isConcurrent: true},
{unstable_isConcurrent: true},
),
);

Expand Down Expand Up @@ -333,7 +333,7 @@ describe('DebugTracing', () => {
<React.unstable_DebugTracingMode>
<Example />
</React.unstable_DebugTracingMode>,
{isConcurrent: true},
{unstable_isConcurrent: true},
);
});
expect(logs).toEqual([
Expand All @@ -358,7 +358,7 @@ describe('DebugTracing', () => {
<React.unstable_DebugTracingMode>
<Example />
</React.unstable_DebugTracingMode>,
{isConcurrent: true},
{unstable_isConcurrent: true},
);
});

Expand All @@ -381,7 +381,7 @@ describe('DebugTracing', () => {
<React.unstable_DebugTracingMode>
<Example />
</React.unstable_DebugTracingMode>,
{isConcurrent: true},
{unstable_isConcurrent: true},
),
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ describe('ErrorBoundaryReconciliation', () => {
<ErrorBoundary fallbackTagName={fallbackTagName}>
<BrokenRender fail={false} />
</ErrorBoundary>,
{isConcurrent: isConcurrent},
{unstable_isConcurrent: isConcurrent},
);
});
expect(renderer).toMatchRenderedOutput(<span prop="BrokenRender" />);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ describe('ReactHooks', () => {
return <Child text={text} />;
}

const root = ReactTestRenderer.create(null, {isConcurrent: true});
const root = ReactTestRenderer.create(null, {unstable_isConcurrent: true});
root.update(<Parent />);
await waitForAll(['Parent: 0, 0', 'Child: 0, 0', 'Effect: 0, 0']);
expect(root).toMatchRenderedOutput('0, 0');
Expand Down Expand Up @@ -174,7 +174,7 @@ describe('ReactHooks', () => {

Parent = memo(Parent);

const root = ReactTestRenderer.create(null, {isConcurrent: true});
const root = ReactTestRenderer.create(null, {unstable_isConcurrent: true});
root.update(<Parent theme="light" />);
await waitForAll(['Parent: 0, 0 (light)', 'Child: 0, 0 (light)']);
expect(root).toMatchRenderedOutput('0, 0 (light)');
Expand Down Expand Up @@ -232,7 +232,7 @@ describe('ReactHooks', () => {
return counter;
}

const root = ReactTestRenderer.create(null, {isConcurrent: true});
const root = ReactTestRenderer.create(null, {unstable_isConcurrent: true});
root.update(<Counter />);
await waitForAll(['Count: 0']);
expect(root).toMatchRenderedOutput('0');
Expand Down Expand Up @@ -266,7 +266,7 @@ describe('ReactHooks', () => {
return counter;
}

const root = ReactTestRenderer.create(null, {isConcurrent: true});
const root = ReactTestRenderer.create(null, {unstable_isConcurrent: true});
root.update(<Counter />);
await waitForAll(['Count: 0']);
expect(root).toMatchRenderedOutput('0');
Expand Down Expand Up @@ -322,7 +322,7 @@ describe('ReactHooks', () => {
});
return <Child text={text} />;
}
const root = ReactTestRenderer.create(null, {isConcurrent: true});
const root = ReactTestRenderer.create(null, {unstable_isConcurrent: true});
await act(() => {
root.update(
<ThemeProvider>
Expand Down Expand Up @@ -390,7 +390,7 @@ describe('ReactHooks', () => {
return <Child text={counter} />;
}

const root = ReactTestRenderer.create(null, {isConcurrent: true});
const root = ReactTestRenderer.create(null, {unstable_isConcurrent: true});
root.update(<Parent />);
await waitForAll(['Parent: 0', 'Child: 0', 'Effect: 0']);
expect(root).toMatchRenderedOutput('0');
Expand Down Expand Up @@ -465,7 +465,7 @@ describe('ReactHooks', () => {
return <Child text={counter} />;
}

const root = ReactTestRenderer.create(null, {isConcurrent: true});
const root = ReactTestRenderer.create(null, {unstable_isConcurrent: true});
root.update(<Parent />);
await waitForAll(['Parent: 0', 'Child: 0']);
expect(root).toMatchRenderedOutput('0');
Expand Down Expand Up @@ -523,7 +523,7 @@ describe('ReactHooks', () => {
return <Child text={counter} />;
}

const root = ReactTestRenderer.create(null, {isConcurrent: true});
const root = ReactTestRenderer.create(null, {unstable_isConcurrent: true});
root.update(<Parent />);
await waitForAll(['Parent: 1', 'Child: 1']);
expect(root).toMatchRenderedOutput('1');
Expand Down
Loading

0 comments on commit b81de30

Please sign in to comment.