+ >
+ );
}
diff --git a/packages/react-dom-bindings/src/client/ReactDOMComponent.js b/packages/react-dom-bindings/src/client/ReactDOMComponent.js
index cc773dea4de36..24462c1d2bb5a 100644
--- a/packages/react-dom-bindings/src/client/ReactDOMComponent.js
+++ b/packages/react-dom-bindings/src/client/ReactDOMComponent.js
@@ -66,6 +66,7 @@ import {validateProperties as validateUnknownProperties} from '../shared/ReactDO
import sanitizeURL from '../shared/sanitizeURL';
import {
+ enableBigIntSupport,
enableCustomElementPropertySupport,
enableClientRenderFallbackOnTextMismatch,
enableFormActions,
@@ -326,7 +327,7 @@ function normalizeMarkupForTextOrAttribute(markup: mixed): string {
export function checkForUnmatchedText(
serverText: string,
- clientText: string | number,
+ clientText: string | number | bigint,
isConcurrentMode: boolean,
shouldWarnDev: boolean,
) {
@@ -397,12 +398,17 @@ function setProp(
if (canSetTextContent) {
setTextContent(domElement, value);
}
- } else if (typeof value === 'number') {
+ } else if (
+ typeof value === 'number' ||
+ (enableBigIntSupport && typeof value === 'bigint')
+ ) {
if (__DEV__) {
+ // $FlowFixMe[unsafe-addition] Flow doesn't want us to use `+` operator with string and bigint
validateTextNesting('' + value, tag);
}
const canSetTextContent = tag !== 'body';
if (canSetTextContent) {
+ // $FlowFixMe[unsafe-addition] Flow doesn't want us to use `+` operator with string and bigint
setTextContent(domElement, '' + value);
}
}
@@ -955,7 +961,11 @@ function setPropOnCustomElement(
case 'children': {
if (typeof value === 'string') {
setTextContent(domElement, value);
- } else if (typeof value === 'number') {
+ } else if (
+ typeof value === 'number' ||
+ (enableBigIntSupport && typeof value === 'bigint')
+ ) {
+ // $FlowFixMe[unsafe-addition] Flow doesn't want us to use `+` operator with string and bigint
setTextContent(domElement, '' + value);
}
break;
@@ -2817,7 +2827,12 @@ export function diffHydratedProperties(
// even listeners these nodes might be wired up to.
// TODO: Warn if there is more than a single textNode as a child.
// TODO: Should we use domElement.firstChild.nodeValue to compare?
- if (typeof children === 'string' || typeof children === 'number') {
+ if (
+ typeof children === 'string' ||
+ typeof children === 'number' ||
+ (enableBigIntSupport && typeof children === 'bigint')
+ ) {
+ // $FlowFixMe[unsafe-addition] Flow doesn't want us to use `+` operator with string and bigint
if (domElement.textContent !== '' + children) {
if (props.suppressHydrationWarning !== true) {
checkForUnmatchedText(
diff --git a/packages/react-dom-bindings/src/client/ReactDOMOption.js b/packages/react-dom-bindings/src/client/ReactDOMOption.js
index 4f7d3105a8ef5..10d04bd6f7eb2 100644
--- a/packages/react-dom-bindings/src/client/ReactDOMOption.js
+++ b/packages/react-dom-bindings/src/client/ReactDOMOption.js
@@ -8,6 +8,7 @@
*/
import {Children} from 'react';
+import {enableBigIntSupport} from 'shared/ReactFeatureFlags';
let didWarnSelectedSetOnOption = false;
let didWarnInvalidChild = false;
@@ -26,7 +27,11 @@ export function validateOptionProps(element: Element, props: Object) {
if (child == null) {
return;
}
- if (typeof child === 'string' || typeof child === 'number') {
+ if (
+ typeof child === 'string' ||
+ typeof child === 'number' ||
+ (enableBigIntSupport && typeof child === 'bigint')
+ ) {
return;
}
if (!didWarnInvalidChild) {
diff --git a/packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js b/packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js
index 9e2c5e41c062f..973a9fb931246 100644
--- a/packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js
+++ b/packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js
@@ -89,6 +89,7 @@ import {
import {retryIfBlockedOn} from '../events/ReactDOMEventReplaying';
import {
+ enableBigIntSupport,
enableCreateEventHandleAPI,
enableScopeAPI,
enableFloat,
@@ -548,6 +549,7 @@ export function shouldSetTextContent(type: string, props: Props): boolean {
type === 'noscript' ||
typeof props.children === 'string' ||
typeof props.children === 'number' ||
+ (enableBigIntSupport && typeof props.children === 'bigint') ||
(typeof props.dangerouslySetInnerHTML === 'object' &&
props.dangerouslySetInnerHTML !== null &&
props.dangerouslySetInnerHTML.__html != null)
diff --git a/packages/react-dom-bindings/src/client/ToStringValue.js b/packages/react-dom-bindings/src/client/ToStringValue.js
index 74a9b5b4bca7f..e1fc51b775dd4 100644
--- a/packages/react-dom-bindings/src/client/ToStringValue.js
+++ b/packages/react-dom-bindings/src/client/ToStringValue.js
@@ -8,10 +8,12 @@
*/
import {checkFormFieldValueStringCoercion} from 'shared/CheckStringCoercion';
+import {enableBigIntSupport} from 'shared/ReactFeatureFlags';
export opaque type ToStringValue =
| boolean
| number
+ | bigint
| Object
| string
| null
@@ -28,6 +30,12 @@ export function toString(value: ToStringValue): string {
export function getToStringValue(value: mixed): ToStringValue {
switch (typeof value) {
+ case 'bigint':
+ if (!enableBigIntSupport) {
+ // bigint is assigned as empty string
+ return '';
+ }
+ // fallthrough for BigInt support
case 'boolean':
case 'number':
case 'string':
diff --git a/packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js b/packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js
index 411e81180d9cf..a469b5587d79a 100644
--- a/packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js
+++ b/packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js
@@ -28,6 +28,7 @@ import {
import {Children} from 'react';
import {
+ enableBigIntSupport,
enableFilterEmptyStringAttributesDOM,
enableCustomElementPropertySupport,
enableFloat,
@@ -1626,7 +1627,9 @@ function flattenOptionChildren(children: mixed): string {
if (
!didWarnInvalidOptionChildren &&
typeof child !== 'string' &&
- typeof child !== 'number'
+ typeof child !== 'number' &&
+ ((enableBigIntSupport && typeof child !== 'bigint') ||
+ !enableBigIntSupport)
) {
didWarnInvalidOptionChildren = true;
console.error(
@@ -2960,36 +2963,40 @@ function pushTitle(
if (Array.isArray(children) && children.length > 1) {
console.error(
- 'React expects the `children` prop of tags to be a string, number, or object with a novel `toString` method but found an Array with length %s instead.' +
+ 'React expects the `children` prop of tags to be a string, number%s, or object with a novel `toString` method but found an Array with length %s instead.' +
' Browsers treat all child Nodes of tags as Text content and React expects to be able to convert `children` of tags to a single string value' +
' which is why Arrays of length greater than 1 are not supported. When using JSX it can be commong to combine text nodes and value nodes.' +
' For example: hello {nameOfUser}. While not immediately apparent, `children` in this case is an Array with length 2. If your `children` prop' +
' is using this form try rewriting it using a template string: {`hello ${nameOfUser}`}.',
+ enableBigIntSupport ? ', bigint' : '',
children.length,
);
} else if (typeof child === 'function' || typeof child === 'symbol') {
const childType =
typeof child === 'function' ? 'a Function' : 'a Sybmol';
console.error(
- 'React expect children of tags to be a string, number, or object with a novel `toString` method but found %s instead.' +
+ 'React expect children of tags to be a string, number%s, or object with a novel `toString` method but found %s instead.' +
' Browsers treat all child Nodes of tags as Text content and React expects to be able to convert children of ' +
' tags to a single string value.',
+ enableBigIntSupport ? ', bigint' : '',
childType,
);
} else if (child && child.toString === {}.toString) {
if (child.$$typeof != null) {
console.error(
- 'React expects the `children` prop of tags to be a string, number, or object with a novel `toString` method but found an object that appears to be' +
+ 'React expects the `children` prop of tags to be a string, number%s, or object with a novel `toString` method but found an object that appears to be' +
' a React element which never implements a suitable `toString` method. Browsers treat all child Nodes of tags as Text content and React expects to' +
' be able to convert children of tags to a single string value which is why rendering React elements is not supported. If the `children` of is' +
' a React Component try moving the tag into that component. If the `children` of is some HTML markup change it to be Text only to be valid HTML.',
+ enableBigIntSupport ? ', bigint' : '',
);
} else {
console.error(
- 'React expects the `children` prop of tags to be a string, number, or object with a novel `toString` method but found an object that does not implement' +
+ 'React expects the `children` prop of tags to be a string, number%s, or object with a novel `toString` method but found an object that does not implement' +
' a suitable `toString` method. Browsers treat all child Nodes of tags as Text content and React expects to be able to convert children of tags' +
' to a single string value. Using the default `toString` method available on every object is almost certainly an error. Consider whether the `children` of this ' +
' is an object in error and change it to a string or number value if so. Otherwise implement a `toString` method that React can use to produce a valid .',
+ enableBigIntSupport ? ', bigint' : '',
);
}
}
@@ -3123,14 +3130,17 @@ function pushStartTitle(
} else if (
childForValidation != null &&
typeof childForValidation !== 'string' &&
- typeof childForValidation !== 'number'
+ typeof childForValidation !== 'number' &&
+ ((enableBigIntSupport && typeof childForValidation !== 'bigint') ||
+ !enableBigIntSupport)
) {
console.error(
- 'A title element received a value that was not a string or number for children. ' +
+ 'A title element received a value that was not a string or number%s for children. ' +
'In the browser title Elements can only have Text Nodes as children. If ' +
'the children being rendered output more than a single text node in aggregate the browser ' +
'will display markup and comments as text in the title and hydration will likely fail and ' +
'fall back to client rendering',
+ enableBigIntSupport ? ' or bigint' : '',
);
}
}
diff --git a/packages/react-dom-bindings/src/server/escapeTextForBrowser.js b/packages/react-dom-bindings/src/server/escapeTextForBrowser.js
index 842d1b1328fdb..6fd43c01c5f69 100644
--- a/packages/react-dom-bindings/src/server/escapeTextForBrowser.js
+++ b/packages/react-dom-bindings/src/server/escapeTextForBrowser.js
@@ -39,6 +39,7 @@
*/
import {checkHtmlStringCoercion} from 'shared/CheckStringCoercion';
+import {enableBigIntSupport} from 'shared/ReactFeatureFlags';
const matchHtmlRegExp = /["'&<>]/;
@@ -106,7 +107,11 @@ function escapeHtml(string: string) {
* @return {string} An escaped string.
*/
function escapeTextForBrowser(text: string | number | boolean): string {
- if (typeof text === 'boolean' || typeof text === 'number') {
+ if (
+ typeof text === 'boolean' ||
+ typeof text === 'number' ||
+ (enableBigIntSupport && typeof text === 'bigint')
+ ) {
// this shortcircuit helps perf for types that we know will never have
// special characters, especially given that this function is used often
// for numeric dom ids.
diff --git a/packages/react-dom/src/__tests__/ReactDOMFiber-test.js b/packages/react-dom/src/__tests__/ReactDOMFiber-test.js
index 94172ab77b237..2882cab2e9991 100644
--- a/packages/react-dom/src/__tests__/ReactDOMFiber-test.js
+++ b/packages/react-dom/src/__tests__/ReactDOMFiber-test.js
@@ -60,6 +60,17 @@ describe('ReactDOMFiber', () => {
expect(container.textContent).toEqual('10');
});
+ // @gate enableBigIntSupport
+ it('should render bigints as children', async () => {
+ const Box = ({value}) =>
);
+ });
+
it('Supports custom abort reasons with a string', async () => {
function App() {
return (
@@ -5642,6 +5653,60 @@ describe('ReactDOMFizzServer', () => {
expect(getVisibleChildren(document.head)).toEqual(hello);
});
+ it('should accept a single number child', async () => {
+ // a Single number child
+ function App() {
+ return (
+
+ 4
+
+ );
+ }
+
+ await act(() => {
+ const {pipe} = renderToPipeableStream();
+ pipe(writable);
+ });
+ expect(getVisibleChildren(document.head)).toEqual(4);
+
+ const errors = [];
+ ReactDOMClient.hydrateRoot(container, , {
+ onRecoverableError(error) {
+ errors.push(error.message);
+ },
+ });
+ await waitForAll([]);
+ expect(errors).toEqual([]);
+ expect(getVisibleChildren(document.head)).toEqual(4);
+ });
+
+ it('should accept a single bigint child', async () => {
+ // a Single number child
+ function App() {
+ return (
+
+ 5n
+
+ );
+ }
+
+ await act(() => {
+ const {pipe} = renderToPipeableStream();
+ pipe(writable);
+ });
+ expect(getVisibleChildren(document.head)).toEqual(5n);
+
+ const errors = [];
+ ReactDOMClient.hydrateRoot(container, , {
+ onRecoverableError(error) {
+ errors.push(error.message);
+ },
+ });
+ await waitForAll([]);
+ expect(errors).toEqual([]);
+ expect(getVisibleChildren(document.head)).toEqual(5n);
+ });
+
it('should accept children array of length 1 containing a string', async () => {
// a Single string child
function App() {
@@ -5684,7 +5749,9 @@ describe('ReactDOMFizzServer', () => {
pipe(writable);
});
}).toErrorDev([
- 'React expects the `children` prop of tags to be a string, number, or object with a novel `toString` method but found an Array with length 2 instead. Browsers treat all child Nodes of tags as Text content and React expects to be able to convert `children` of tags to a single string value which is why Arrays of length greater than 1 are not supported. When using JSX it can be commong to combine text nodes and value nodes. For example: hello {nameOfUser}. While not immediately apparent, `children` in this case is an Array with length 2. If your `children` prop is using this form try rewriting it using a template string: {`hello ${nameOfUser}`}.',
+ 'React expects the `children` prop of tags to be a string, number' +
+ gate(flags => (flags.enableBigIntSupport ? ', bigint' : '')) +
+ ', or object with a novel `toString` method but found an Array with length 2 instead. Browsers treat all child Nodes of tags as Text content and React expects to be able to convert `children` of tags to a single string value which is why Arrays of length greater than 1 are not supported. When using JSX it can be commong to combine text nodes and value nodes. For example: hello {nameOfUser}. While not immediately apparent, `children` in this case is an Array with length 2. If your `children` prop is using this form try rewriting it using a template string: {`hello ${nameOfUser}`}.',
]);
if (gate(flags => flags.enableFloat)) {
@@ -5744,7 +5811,67 @@ describe('ReactDOMFizzServer', () => {
pipe(writable);
});
}).toErrorDev([
- 'React expects the `children` prop of tags to be a string, number, or object with a novel `toString` method but found an object that appears to be a React element which never implements a suitable `toString` method. Browsers treat all child Nodes of tags as Text content and React expects to be able to convert children of tags to a single string value which is why rendering React elements is not supported. If the `children` of is a React Component try moving the tag into that component. If the `children` of is some HTML markup change it to be Text only to be valid HTML.',
+ 'React expects the `children` prop of tags to be a string, number' +
+ gate(flags => (flags.enableBigIntSupport ? ', bigint' : '')) +
+ ', or object with a novel `toString` method but found an object that appears to be a React element which never implements a suitable `toString` method. Browsers treat all child Nodes of tags as Text content and React expects to be able to convert children of tags to a single string value which is why rendering React elements is not supported. If the `children` of is a React Component try moving the tag into that component. If the `children` of is some HTML markup change it to be Text only to be valid HTML.',
+ ]);
+ } else {
+ await expect(async () => {
+ await act(() => {
+ const {pipe} = renderToPipeableStream();
+ pipe(writable);
+ });
+ }).toErrorDev([
+ 'A title element received a React element for children. In the browser title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering',
+ ]);
+ }
+
+ if (gate(flags => flags.enableFloat)) {
+ // object titles are toStringed when float is on
+ expect(getVisibleChildren(document.head)).toEqual(
+ {'[object Object]'},
+ );
+ } else {
+ expect(getVisibleChildren(document.head)).toEqual(hello);
+ }
+
+ const errors = [];
+ ReactDOMClient.hydrateRoot(document.head, , {
+ onRecoverableError(error) {
+ errors.push(error.message);
+ },
+ });
+ await waitForAll([]);
+ expect(errors).toEqual([]);
+ if (gate(flags => flags.enableFloat)) {
+ // object titles are toStringed when float is on
+ expect(getVisibleChildren(document.head)).toEqual(
+ {'[object Object]'},
+ );
+ } else {
+ expect(getVisibleChildren(document.head)).toEqual(hello);
+ }
+ });
+
+ it('should warn in dev if you pass an object that does not implement toString as a child to ', async () => {
+ function App() {
+ return (
+
+ {{}}
+
+ );
+ }
+
+ if (gate(flags => flags.enableFloat)) {
+ await expect(async () => {
+ await act(() => {
+ const {pipe} = renderToPipeableStream();
+ pipe(writable);
+ });
+ }).toErrorDev([
+ 'React expects the `children` prop of tags to be a string, number' +
+ gate(flags => (flags.enableBigIntSupport ? ', bigint' : '')) +
+ ', or object with a novel `toString` method but found an object that does not implement a suitable `toString` method. Browsers treat all child Nodes of tags as Text content and React expects to be able to convert children of tags to a single string value. Using the default `toString` method available on every object is almost certainly an error. Consider whether the `children` of this is an object in error and change it to a string or number value if so. Otherwise implement a `toString` method that React can use to produce a valid .',
]);
} else {
await expect(async () => {
diff --git a/packages/react-dom/src/__tests__/ReactDOMInput-test.js b/packages/react-dom/src/__tests__/ReactDOMInput-test.js
index 7d1ed0e21d471..ad7342f53398d 100644
--- a/packages/react-dom/src/__tests__/ReactDOMInput-test.js
+++ b/packages/react-dom/src/__tests__/ReactDOMInput-test.js
@@ -657,6 +657,16 @@ describe('ReactDOMInput', () => {
expect(div.firstChild.getAttribute('defaultValue')).toBe(null);
});
+ it('should render bigint defaultValue for SSR', () => {
+ const markup = ReactDOMServer.renderToString(
+ ,
+ );
+ const div = document.createElement('div');
+ div.innerHTML = markup;
+ expect(div.firstChild.getAttribute('value')).toBe('5');
+ expect(div.firstChild.getAttribute('defaultValue')).toBe(null);
+ });
+
it('should render value for SSR', () => {
const element = {}} />;
const markup = ReactDOMServer.renderToString(element);
@@ -666,6 +676,15 @@ describe('ReactDOMInput', () => {
expect(div.firstChild.getAttribute('defaultValue')).toBe(null);
});
+ it('should render bigint value for SSR', () => {
+ const element = {}} />;
+ const markup = ReactDOMServer.renderToString(element);
+ const div = document.createElement('div');
+ div.innerHTML = markup;
+ expect(div.firstChild.getAttribute('value')).toBe('5');
+ expect(div.firstChild.getAttribute('defaultValue')).toBe(null);
+ });
+
it('should render name attribute if it is supplied', async () => {
await act(() => {
root.render();
@@ -830,6 +849,16 @@ describe('ReactDOMInput', () => {
expect(node.value).toBe('0');
});
+ // @gate enableBigIntSupport
+ it('should display `value` of bigint 5', async () => {
+ await act(() => {
+ root.render();
+ });
+ const node = container.firstChild;
+
+ expect(node.value).toBe('5');
+ });
+
it('should allow setting `value` to `true`', async () => {
await act(() => {
root.render();
diff --git a/packages/react-dom/src/__tests__/ReactDOMOption-test.js b/packages/react-dom/src/__tests__/ReactDOMOption-test.js
index abeae80125bdf..a75ce875001f6 100644
--- a/packages/react-dom/src/__tests__/ReactDOMOption-test.js
+++ b/packages/react-dom/src/__tests__/ReactDOMOption-test.js
@@ -172,6 +172,13 @@ describe('ReactDOMOption', () => {
expect(node.value).toBe('hello');
});
+ // @gate enableBigIntSupport
+ it('should support bigint values', () => {
+ const node = ReactTestUtils.renderIntoDocument();
+ expect(node.innerHTML).toBe('5');
+ expect(node.value).toBe('5');
+ });
+
it('should be able to use dangerouslySetInnerHTML on option', () => {
const stub = ;
let node;
diff --git a/packages/react-dom/src/__tests__/ReactDOMServerIntegrationBasic-test.js b/packages/react-dom/src/__tests__/ReactDOMServerIntegrationBasic-test.js
index 5589e5dc3a220..266bae3d5eeaa 100644
--- a/packages/react-dom/src/__tests__/ReactDOMServerIntegrationBasic-test.js
+++ b/packages/react-dom/src/__tests__/ReactDOMServerIntegrationBasic-test.js
@@ -72,6 +72,16 @@ describe('ReactDOMServerIntegration', () => {
expect(e.nodeValue).toMatch('42');
});
+ itRenders('a bigint', async render => {
+ const e = await render(42n);
+ if (gate(flags => flags.enableBigIntSupport)) {
+ expect(e.nodeType).toBe(3);
+ expect(e.nodeValue).toMatch('42');
+ } else {
+ expect(e).toBe(null);
+ }
+ });
+
itRenders('an array with one child', async render => {
const e = await render([
text1
]);
const parent = e.parentNode;
diff --git a/packages/react-dom/src/__tests__/ReactDOMServerIntegrationInput-test.js b/packages/react-dom/src/__tests__/ReactDOMServerIntegrationInput-test.js
index 4abf637a53713..3ad7abf91a7df 100644
--- a/packages/react-dom/src/__tests__/ReactDOMServerIntegrationInput-test.js
+++ b/packages/react-dom/src/__tests__/ReactDOMServerIntegrationInput-test.js
@@ -32,7 +32,8 @@ function initModules() {
};
}
-const {resetModules, itRenders} = ReactDOMServerIntegrationUtils(initModules);
+const {resetModules, itRenders, serverRender, streamRender} =
+ ReactDOMServerIntegrationUtils(initModules);
// TODO: Run this in React Fire mode after we figure out the SSR behavior.
const desc = disableInputAttributeSyncing ? xdescribe : describe;
@@ -46,6 +47,18 @@ desc('ReactDOMServerIntegrationInput', () => {
expect(e.value).toBe('foo');
});
+ itRenders('an input with a bigint value and an onChange', async render => {
+ console.log(gate(flags => flags.enableBigIntSupport));
+ const e = await render( {}} />);
+ expect(e.value).toBe(
+ gate(flags => flags.enableBigIntSupport) ||
+ render === serverRender ||
+ render === streamRender
+ ? '5'
+ : '',
+ );
+ });
+
itRenders('an input with a value and readOnly', async render => {
const e = await render();
expect(e.value).toBe('foo');
diff --git a/packages/react-dom/src/__tests__/ReactDOMServerIntegrationSelect-test.js b/packages/react-dom/src/__tests__/ReactDOMServerIntegrationSelect-test.js
index 8bf3c7c3d20da..13c7f78ea831e 100644
--- a/packages/react-dom/src/__tests__/ReactDOMServerIntegrationSelect-test.js
+++ b/packages/react-dom/src/__tests__/ReactDOMServerIntegrationSelect-test.js
@@ -218,11 +218,15 @@ describe('ReactDOMServerIntegrationSelect', () => {
itRenders('a select option with flattened children', async render => {
const e = await render(
,
);
const option = e.options[0];
- expect(option.textContent).toBe('A B');
+ expect(option.textContent).toBe(
+ gate(flags => flags.enableBigIntSupport) ? 'A B 5' : 'A B ',
+ );
expect(option.value).toBe('bar');
expect(option.selected).toBe(true);
});
diff --git a/packages/react-dom/src/__tests__/ReactDOMServerIntegrationTextarea-test.js b/packages/react-dom/src/__tests__/ReactDOMServerIntegrationTextarea-test.js
index ff69355812d3c..79b5fd840d88a 100644
--- a/packages/react-dom/src/__tests__/ReactDOMServerIntegrationTextarea-test.js
+++ b/packages/react-dom/src/__tests__/ReactDOMServerIntegrationTextarea-test.js
@@ -30,7 +30,8 @@ function initModules() {
};
}
-const {resetModules, itRenders} = ReactDOMServerIntegrationUtils(initModules);
+const {resetModules, itRenders, serverRender, streamRender} =
+ ReactDOMServerIntegrationUtils(initModules);
describe('ReactDOMServerIntegrationTextarea', () => {
beforeEach(() => {
@@ -47,12 +48,23 @@ describe('ReactDOMServerIntegrationTextarea', () => {
expect(e.value).toBe('foo');
});
+ itRenders('a textarea with a bigint value and an onChange', async render => {
+ const e = await render(