From dbe2dcc97ae98d64cdd3b890a0c3698996c58014 Mon Sep 17 00:00:00 2001 From: Carl Vitullo Date: Thu, 2 Jan 2020 11:03:22 -0500 Subject: [PATCH] Rerere-fix tests --- .../__tests__/ReactDOMComponentTree-test.js | 6 +- .../src/__tests__/ReactDOMInput-test.js | 64 +++++++++---------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/packages/react-dom/src/__tests__/ReactDOMComponentTree-test.js b/packages/react-dom/src/__tests__/ReactDOMComponentTree-test.js index feedb71505b2e..cc2f557706805 100644 --- a/packages/react-dom/src/__tests__/ReactDOMComponentTree-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMComponentTree-test.js @@ -178,9 +178,9 @@ describe('ReactDOMComponentTree', () => { const component = ; 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', diff --git a/packages/react-dom/src/__tests__/ReactDOMInput-test.js b/packages/react-dom/src/__tests__/ReactDOMInput-test.js index 04377ae7b55eb..007e91166709a 100644 --- a/packages/react-dom/src/__tests__/ReactDOMInput-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMInput-test.js @@ -1266,8 +1266,8 @@ describe('ReactDOMInput', () => { ReactDOM.render(stub, container); expect(() => ReactDOM.render(, 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 **)', @@ -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 **)', @@ -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 **)', @@ -1320,8 +1320,8 @@ describe('ReactDOMInput', () => { ReactDOM.render(, 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 **)', @@ -1338,8 +1338,8 @@ describe('ReactDOMInput', () => { ReactDOM.render(, 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 **)', @@ -1355,8 +1355,8 @@ describe('ReactDOMInput', () => { ReactDOM.render(, 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 **)', @@ -1372,8 +1372,8 @@ describe('ReactDOMInput', () => { ReactDOM.render(, 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 **)', @@ -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 **)', @@ -1407,8 +1407,8 @@ describe('ReactDOMInput', () => { ReactDOM.render(, 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 **)', @@ -1422,8 +1422,8 @@ describe('ReactDOMInput', () => { ReactDOM.render(, 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 **)', @@ -1435,8 +1435,8 @@ describe('ReactDOMInput', () => { ReactDOM.render(stub, container); expect(() => ReactDOM.render(, 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 **)', @@ -1450,8 +1450,8 @@ describe('ReactDOMInput', () => { ReactDOM.render(, 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 **)', @@ -1465,8 +1465,8 @@ describe('ReactDOMInput', () => { ReactDOM.render(, 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 **)', @@ -1480,8 +1480,8 @@ describe('ReactDOMInput', () => { ReactDOM.render(, 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 **)', @@ -1495,8 +1495,8 @@ describe('ReactDOMInput', () => { ReactDOM.render(, 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 **)', @@ -1548,8 +1548,8 @@ describe('ReactDOMInput', () => { ReactDOM.render(, 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 **)',