Skip to content

Commit

Permalink
Rerere-fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vcarl committed Jan 2, 2020
1 parent 2a1088c commit dbe2dcc
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@ describe('ReactDOMComponentTree', () => {
const component = <Controlled />;
const instance = ReactDOM.render(component, container);
expect(() => simulateInput(instance.a, finishValue)).toErrorDev(
'Warning: A component is changing an uncontrolled input to be ' +
'controlled. This is likely caused by the value changing from ' +
'a defined to undefined, which should not happen. ' +
'Warning: A component is changing an uncontrolled input to be controlled. ' +
'This is likely caused by the value changing from undefined to ' +
'a defined value, which should not happen. ' +
'Decide between using a controlled or uncontrolled input ' +
'element for the lifetime of the component. More info: ' +
'https://fb.me/react-controlled-components',
Expand Down
64 changes: 32 additions & 32 deletions packages/react-dom/src/__tests__/ReactDOMInput-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1266,8 +1266,8 @@ describe('ReactDOMInput', () => {
ReactDOM.render(stub, container);
expect(() => ReactDOM.render(<input type="text" />, container)).toErrorDev(
'Warning: A component is changing a controlled input to be uncontrolled. ' +
'This is likely caused by the value changing from undefined to ' +
'a defined value, which should not happen. ' +
'This is likely caused by the value changing from a defined to ' +
'undefined, which should not happen. ' +
'Decide between using a controlled or uncontrolled input ' +
'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' +
' in input (at **)',
Expand All @@ -1285,8 +1285,8 @@ describe('ReactDOMInput', () => {
'`value` prop on `input` should not be null. ' +
'Consider using an empty string to clear the component or `undefined` for uncontrolled components',
'Warning: A component is changing a controlled input to be uncontrolled. ' +
'This is likely caused by the value changing from undefined to ' +
'a defined value, which should not happen. ' +
'This is likely caused by the value changing from a defined to ' +
'undefined, which should not happen. ' +
'Decide between using a controlled or uncontrolled input ' +
'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' +
' in input (at **)',
Expand All @@ -1305,8 +1305,8 @@ describe('ReactDOMInput', () => {
),
).toErrorDev(
'Warning: A component is changing a controlled input to be uncontrolled. ' +
'This is likely caused by the value changing from undefined to ' +
'a defined value, which should not happen. ' +
'This is likely caused by the value changing from a defined to ' +
'undefined, which should not happen. ' +
'Decide between using a controlled or uncontrolled input ' +
'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' +
' in input (at **)',
Expand All @@ -1320,8 +1320,8 @@ describe('ReactDOMInput', () => {
ReactDOM.render(<input type="text" value="controlled" />, container),
).toErrorDev(
'Warning: A component is changing an uncontrolled input to be controlled. ' +
'This is likely caused by the value changing from a defined to ' +
'undefined, which should not happen. ' +
'This is likely caused by the value changing from undefined to ' +
'a defined value, which should not happen. ' +
'Decide between using a controlled or uncontrolled input ' +
'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' +
' in input (at **)',
Expand All @@ -1338,8 +1338,8 @@ describe('ReactDOMInput', () => {
ReactDOM.render(<input type="text" value="controlled" />, container),
).toErrorDev(
'Warning: A component is changing an uncontrolled input to be controlled. ' +
'This is likely caused by the value changing from a defined to ' +
'undefined, which should not happen. ' +
'This is likely caused by the value changing from undefined to ' +
'a defined value, which should not happen. ' +
'Decide between using a controlled or uncontrolled input ' +
'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' +
' in input (at **)',
Expand All @@ -1355,8 +1355,8 @@ describe('ReactDOMInput', () => {
ReactDOM.render(<input type="checkbox" />, container),
).toErrorDev(
'Warning: A component is changing a controlled input to be uncontrolled. ' +
'This is likely caused by the value changing from undefined to ' +
'a defined value, which should not happen. ' +
'This is likely caused by the value changing from a defined to ' +
'undefined, which should not happen. ' +
'Decide between using a controlled or uncontrolled input ' +
'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' +
' in input (at **)',
Expand All @@ -1372,8 +1372,8 @@ describe('ReactDOMInput', () => {
ReactDOM.render(<input type="checkbox" checked={null} />, container),
).toErrorDev(
'Warning: A component is changing a controlled input to be uncontrolled. ' +
'This is likely caused by the value changing from undefined to ' +
'a defined value, which should not happen. ' +
'This is likely caused by the value changing from a defined to ' +
'undefined, which should not happen. ' +
'Decide between using a controlled or uncontrolled input ' +
'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' +
' in input (at **)',
Expand All @@ -1392,8 +1392,8 @@ describe('ReactDOMInput', () => {
),
).toErrorDev(
'Warning: A component is changing a controlled input to be uncontrolled. ' +
'This is likely caused by the value changing from undefined to ' +
'a defined value, which should not happen. ' +
'This is likely caused by the value changing from a defined to ' +
'undefined, which should not happen. ' +
'Decide between using a controlled or uncontrolled input ' +
'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' +
' in input (at **)',
Expand All @@ -1407,8 +1407,8 @@ describe('ReactDOMInput', () => {
ReactDOM.render(<input type="checkbox" checked={true} />, container),
).toErrorDev(
'Warning: A component is changing an uncontrolled input to be controlled. ' +
'This is likely caused by the value changing from a defined to ' +
'undefined, which should not happen. ' +
'This is likely caused by the value changing from undefined to ' +
'a defined value, which should not happen. ' +
'Decide between using a controlled or uncontrolled input ' +
'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' +
' in input (at **)',
Expand All @@ -1422,8 +1422,8 @@ describe('ReactDOMInput', () => {
ReactDOM.render(<input type="checkbox" checked={true} />, container),
).toErrorDev(
'Warning: A component is changing an uncontrolled input to be controlled. ' +
'This is likely caused by the value changing from a defined to ' +
'undefined, which should not happen. ' +
'This is likely caused by the value changing from undefined to ' +
'a defined value, which should not happen. ' +
'Decide between using a controlled or uncontrolled input ' +
'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' +
' in input (at **)',
Expand All @@ -1435,8 +1435,8 @@ describe('ReactDOMInput', () => {
ReactDOM.render(stub, container);
expect(() => ReactDOM.render(<input type="radio" />, container)).toErrorDev(
'Warning: A component is changing a controlled input to be uncontrolled. ' +
'This is likely caused by the value changing from undefined to ' +
'a defined value, which should not happen. ' +
'This is likely caused by the value changing from a defined to ' +
'undefined, which should not happen. ' +
'Decide between using a controlled or uncontrolled input ' +
'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' +
' in input (at **)',
Expand All @@ -1450,8 +1450,8 @@ describe('ReactDOMInput', () => {
ReactDOM.render(<input type="radio" checked={null} />, container),
).toErrorDev(
'Warning: A component is changing a controlled input to be uncontrolled. ' +
'This is likely caused by the value changing from undefined to ' +
'a defined value, which should not happen. ' +
'This is likely caused by the value changing from a defined to ' +
'undefined, which should not happen. ' +
'Decide between using a controlled or uncontrolled input ' +
'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' +
' in input (at **)',
Expand All @@ -1465,8 +1465,8 @@ describe('ReactDOMInput', () => {
ReactDOM.render(<input type="radio" defaultChecked={true} />, container),
).toErrorDev(
'Warning: A component is changing a controlled input to be uncontrolled. ' +
'This is likely caused by the value changing from undefined to ' +
'a defined value, which should not happen. ' +
'This is likely caused by the value changing from a defined to ' +
'undefined, which should not happen. ' +
'Decide between using a controlled or uncontrolled input ' +
'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' +
' in input (at **)',
Expand All @@ -1480,8 +1480,8 @@ describe('ReactDOMInput', () => {
ReactDOM.render(<input type="radio" checked={true} />, container),
).toErrorDev(
'Warning: A component is changing an uncontrolled input to be controlled. ' +
'This is likely caused by the value changing from a defined to ' +
'undefined, which should not happen. ' +
'This is likely caused by the value changing from undefined to ' +
'a defined value, which should not happen. ' +
'Decide between using a controlled or uncontrolled input ' +
'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' +
' in input (at **)',
Expand All @@ -1495,8 +1495,8 @@ describe('ReactDOMInput', () => {
ReactDOM.render(<input type="radio" checked={true} />, container),
).toErrorDev(
'Warning: A component is changing an uncontrolled input to be controlled. ' +
'This is likely caused by the value changing from a defined to ' +
'undefined, which should not happen. ' +
'This is likely caused by the value changing from undefined to ' +
'a defined value, which should not happen. ' +
'Decide between using a controlled or uncontrolled input ' +
'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' +
' in input (at **)',
Expand Down Expand Up @@ -1548,8 +1548,8 @@ describe('ReactDOMInput', () => {
ReactDOM.render(<input type="radio" value="value" />, container),
).toErrorDev(
'Warning: A component is changing a controlled input to be uncontrolled. ' +
'This is likely caused by the value changing from undefined to ' +
'a defined value, which should not happen. ' +
'This is likely caused by the value changing from a defined to ' +
'undefined, which should not happen. ' +
'Decide between using a controlled or uncontrolled input ' +
'element for the lifetime of the component. More info: https://fb.me/react-controlled-components\n' +
' in input (at **)',
Expand Down

0 comments on commit dbe2dcc

Please sign in to comment.