Skip to content

Commit 9cfbed6

Browse files
committed
Remove unnecessary changes
1 parent 1e2d2a3 commit 9cfbed6

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

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

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ describe('ReactDOMInput', () => {
106106
ReactDOM.render(<input type="text" />, container);
107107
ReactDOM.unmountComponentAtNode(container);
108108
ReactDOM.render(<input type="text" value={undefined} />, container);
109+
ReactDOM.unmountComponentAtNode(container);
109110
ReactDOM.render(<input type="checkbox" />, container);
110111
ReactDOM.unmountComponentAtNode(container);
111112
ReactDOM.render(<input type="checkbox" checked={undefined} />, container);
@@ -1096,10 +1097,7 @@ describe('ReactDOMInput', () => {
10961097
const stub = <input type="text" />;
10971098
ReactDOM.render(stub, container);
10981099
expect(() =>
1099-
ReactDOM.render(
1100-
<input type="text" value="controlled" onChange={emptyFunction} />,
1101-
container,
1102-
),
1100+
ReactDOM.render(<input type="text" value="controlled" />, container),
11031101
).toWarnDev(
11041102
'Warning: A component is changing an uncontrolled input of type text to be controlled. ' +
11051103
'Input elements should not switch from uncontrolled to controlled (or vice versa). ' +
@@ -1181,10 +1179,7 @@ describe('ReactDOMInput', () => {
11811179
const stub = <input type="checkbox" />;
11821180
ReactDOM.render(stub, container);
11831181
expect(() =>
1184-
ReactDOM.render(
1185-
<input type="checkbox" checked={true} onChange={emptyFunction} />,
1186-
container,
1187-
),
1182+
ReactDOM.render(<input type="checkbox" checked={true} />, container),
11881183
).toWarnDev(
11891184
'Warning: A component is changing an uncontrolled input of type checkbox to be controlled. ' +
11901185
'Input elements should not switch from uncontrolled to controlled (or vice versa). ' +
@@ -1266,10 +1261,7 @@ describe('ReactDOMInput', () => {
12661261
const stub = <input type="radio" checked={null} />;
12671262
ReactDOM.render(stub, container);
12681263
expect(() =>
1269-
ReactDOM.render(
1270-
<input type="radio" checked={true} onChange={emptyFunction} />,
1271-
container,
1272-
),
1264+
ReactDOM.render(<input type="radio" checked={true} />, container),
12731265
).toWarnDev(
12741266
'Warning: A component is changing an uncontrolled input of type radio to be controlled. ' +
12751267
'Input elements should not switch from uncontrolled to controlled (or vice versa). ' +

0 commit comments

Comments
 (0)