Skip to content

Commit af13a1c

Browse files
committed
fixup! rename renderIntoDocument as renderDocument
1 parent f20cff9 commit af13a1c

File tree

3 files changed

+20
-22
lines changed

3 files changed

+20
-22
lines changed

packages/react-dom/src/__tests__/ReactDOMFizzServer-test.js

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -432,9 +432,9 @@ describe('ReactDOMFizzServer', () => {
432432
mergeOptions(options, renderOptions),
433433
);
434434
}
435-
function renderIntoDocumentAsPipeableStream(jsx, fallback, options) {
435+
function renderDocumentAsPipeableStream(jsx, fallback, options) {
436436
// Merge options with renderOptions, which may contain featureFlag specific behavior
437-
return ReactDOMFizzServer.renderIntoDocumentAsPipeableStream(
437+
return ReactDOMFizzServer.renderDocumentAsPipeableStream(
438438
jsx,
439439
fallback,
440440
mergeOptions(options, renderOptions),
@@ -6165,15 +6165,13 @@ describe('ReactDOMFizzServer', () => {
61656165
});
61666166
});
61676167

6168-
describe('renderIntoDocument', () => {
6168+
describe('renderDocument', () => {
61696169
// @gate enableFloat && enableFizzIntoDocument
61706170
it('can render arbitrary HTML into a Document', async () => {
61716171
let content = '';
61726172
writable.on('data', chunk => (content += chunk));
61736173
await act(() => {
6174-
const {pipe} = renderIntoDocumentAsPipeableStream(
6175-
<div id="div">foo</div>,
6176-
);
6174+
const {pipe} = renderDocumentAsPipeableStream(<div id="div">foo</div>);
61776175
pipe(writable);
61786176
});
61796177

@@ -6196,7 +6194,7 @@ describe('ReactDOMFizzServer', () => {
61966194
let content = '';
61976195
writable.on('data', chunk => (content += chunk));
61986196
await act(() => {
6199-
const {pipe} = renderIntoDocumentAsPipeableStream(
6197+
const {pipe} = renderDocumentAsPipeableStream(
62006198
<body id="body">foo</body>,
62016199
);
62026200
pipe(writable);
@@ -6220,7 +6218,7 @@ describe('ReactDOMFizzServer', () => {
62206218
writable.on('data', chunk => (content += chunk));
62216219
await expect(async () => {
62226220
await act(() => {
6223-
const {pipe} = renderIntoDocumentAsPipeableStream(
6221+
const {pipe} = renderDocumentAsPipeableStream(
62246222
<html id="html">
62256223
<head id="head">
62266224
<title>a title</title>
@@ -6231,7 +6229,7 @@ describe('ReactDOMFizzServer', () => {
62316229
pipe(writable);
62326230
});
62336231
}).toErrorDev(
6234-
'A <head> tag was rendered with props when using `renderIntoDocument`. In this rendering mode React may emit the head tag early in some circumstances and therefore props on the <head> tag are not supported and may be missing in the rendered output for any particular render. In many cases props that are set on a <head> tag can be set on the <html> tag instead.',
6232+
'A <head> tag was rendered with props when using `renderDocument`. In this rendering mode React may emit the head tag early in some circumstances and therefore props on the <head> tag are not supported and may be missing in the rendered output for any particular render. In many cases props that are set on a <head> tag can be set on the <html> tag instead.',
62356233
);
62366234

62376235
expect(content.slice(0, 47)).toEqual(
@@ -6253,7 +6251,7 @@ describe('ReactDOMFizzServer', () => {
62536251
let content = '';
62546252
writable.on('data', chunk => (content += chunk));
62556253
await act(() => {
6256-
const {pipe} = renderIntoDocumentAsPipeableStream(
6254+
const {pipe} = renderDocumentAsPipeableStream(
62576255
<html id="html">
62586256
<body id="body">foo</body>
62596257
</html>,
@@ -6284,7 +6282,7 @@ describe('ReactDOMFizzServer', () => {
62846282

62856283
const errors = [];
62866284
await act(() => {
6287-
const {pipe} = renderIntoDocumentAsPipeableStream(
6285+
const {pipe} = renderDocumentAsPipeableStream(
62886286
<html id="html">
62896287
<body id="body">
62906288
<Throw />
@@ -6332,7 +6330,7 @@ describe('ReactDOMFizzServer', () => {
63326330

63336331
const errors = [];
63346332
await act(() => {
6335-
const {pipe} = renderIntoDocumentAsPipeableStream(
6333+
const {pipe} = renderDocumentAsPipeableStream(
63366334
<html id="html">
63376335
<BlockOn value="foo">
63386336
<body id="body">
@@ -6406,7 +6404,7 @@ describe('ReactDOMFizzServer', () => {
64066404

64076405
const errors = [];
64086406
await act(() => {
6409-
const {pipe} = renderIntoDocumentAsPipeableStream(
6407+
const {pipe} = renderDocumentAsPipeableStream(
64106408
<html id="html">
64116409
<link rel="stylesheet" href="foo" precedence="foo" />
64126410
<link rel="stylesheet" href="bar" precedence="bar" />
@@ -6459,7 +6457,7 @@ describe('ReactDOMFizzServer', () => {
64596457

64606458
const errors = [];
64616459
await act(() => {
6462-
const {pipe} = renderIntoDocumentAsPipeableStream(
6460+
const {pipe} = renderDocumentAsPipeableStream(
64636461
<html id="html">
64646462
<body id="body">
64656463
hello world
@@ -6505,7 +6503,7 @@ describe('ReactDOMFizzServer', () => {
65056503

65066504
const errors = [];
65076505
await act(() => {
6508-
const {pipe} = renderIntoDocumentAsPipeableStream(
6506+
const {pipe} = renderDocumentAsPipeableStream(
65096507
<html id="html">
65106508
<body id="body">
65116509
<Throw />
@@ -6550,7 +6548,7 @@ describe('ReactDOMFizzServer', () => {
65506548

65516549
const errors = [];
65526550
await act(() => {
6553-
const {pipe} = renderIntoDocumentAsPipeableStream(
6551+
const {pipe} = renderDocumentAsPipeableStream(
65546552
<html id="html">
65556553
<body id="body">
65566554
<BlockOn value="error">
@@ -6637,7 +6635,7 @@ describe('ReactDOMFizzServer', () => {
66376635
}
66386636

66396637
await act(() => {
6640-
const {pipe} = renderIntoDocumentAsPipeableStream(
6638+
const {pipe} = renderDocumentAsPipeableStream(
66416639
<html id="html">
66426640
<head />
66436641
<body id="body">
@@ -6745,7 +6743,7 @@ describe('ReactDOMFizzServer', () => {
67456743
const errors = [];
67466744
try {
67476745
await act(() => {
6748-
const {pipe} = renderIntoDocumentAsPipeableStream(
6746+
const {pipe} = renderDocumentAsPipeableStream(
67496747
<html id="html">
67506748
<head />
67516749
<link rel="stylesheet" href="foo" precedence="foo" />

packages/react-dom/src/__tests__/ReactDOMFizzServerBrowser-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -646,12 +646,12 @@ describe('ReactDOMFizzServerBrowser', () => {
646646
});
647647
});
648648

649-
describe('renderIntoDocument', () => {
649+
describe('renderDocument', () => {
650650
// @gate enableFloat && enableFizzIntoDocument
651651
it('can render into a container', async () => {
652652
let content = '';
653653
await act(async () => {
654-
const stream = ReactDOMFizzServer.renderIntoDocument(<div>foo</div>);
654+
const stream = ReactDOMFizzServer.renderDocument(<div>foo</div>);
655655
const reader = stream.getReader();
656656
while (true) {
657657
const {done, value} = await reader.read();

packages/react-dom/src/__tests__/ReactDOMFizzServerNode-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -649,11 +649,11 @@ describe('ReactDOMFizzServerNode', () => {
649649
});
650650
});
651651

652-
describe('renderIntoDocumentAsPipeableStream', () => {
652+
describe('renderDocumentAsPipeableStream', () => {
653653
// @gate enableFloat && enableFizzIntoDocument
654654
it('can render into a container', async () => {
655655
const {writable, output} = getTestWritable();
656-
const {pipe} = ReactDOMFizzServer.renderIntoDocumentAsPipeableStream(
656+
const {pipe} = ReactDOMFizzServer.renderDocumentAsPipeableStream(
657657
<div>foo</div>,
658658
);
659659
pipe(writable);

0 commit comments

Comments
 (0)