Add regression test for #6119

This commit is contained in:
Dan Abramov
2018-08-31 16:09:29 +01:00
parent 0f050ad7cc
commit 0d3fc9de10
@@ -139,6 +139,15 @@ describe('DOMPropertyOperations', () => {
ReactDOM.render(<progress value="30" />, container);
expect(container.firstChild.setAttribute).toHaveBeenCalledTimes(2);
});
it('should return the progress to intermediate state on null value', () => {
const container = document.createElement('div');
ReactDOM.render(<progress value={30} />, container);
ReactDOM.render(<progress value={null} />, container);
// Ensure we move progress back to an indeterminate state.
// Regression test for https://github.com/facebook/react/issues/6119
expect(container.firstChild.hasAttribute('value')).toBe(false);
});
});
describe('deleteValueForProperty', () => {