Skip to content

Commit

Permalink
Remove unnecessary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Jul 17, 2018
1 parent 1e2d2a3 commit 118ee8e
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions packages/react-dom/src/__tests__/ReactDOMInput-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1096,10 +1096,7 @@ describe('ReactDOMInput', () => {
const stub = <input type="text" />;
ReactDOM.render(stub, container);
expect(() =>
ReactDOM.render(
<input type="text" value="controlled" onChange={emptyFunction} />,
container,
),
ReactDOM.render(<input type="text" value="controlled" />, container),
).toWarnDev(
'Warning: A component is changing an uncontrolled input of type text to be controlled. ' +
'Input elements should not switch from uncontrolled to controlled (or vice versa). ' +
Expand Down Expand Up @@ -1181,10 +1178,7 @@ describe('ReactDOMInput', () => {
const stub = <input type="checkbox" />;
ReactDOM.render(stub, container);
expect(() =>
ReactDOM.render(
<input type="checkbox" checked={true} onChange={emptyFunction} />,
container,
),
ReactDOM.render(<input type="checkbox" checked={true} />, container),
).toWarnDev(
'Warning: A component is changing an uncontrolled input of type checkbox to be controlled. ' +
'Input elements should not switch from uncontrolled to controlled (or vice versa). ' +
Expand Down Expand Up @@ -1266,10 +1260,7 @@ describe('ReactDOMInput', () => {
const stub = <input type="radio" checked={null} />;
ReactDOM.render(stub, container);
expect(() =>
ReactDOM.render(
<input type="radio" checked={true} onChange={emptyFunction} />,
container,
),
ReactDOM.render(<input type="radio" checked={true} />, container),
).toWarnDev(
'Warning: A component is changing an uncontrolled input of type radio to be controlled. ' +
'Input elements should not switch from uncontrolled to controlled (or vice versa). ' +
Expand Down

0 comments on commit 118ee8e

Please sign in to comment.