Skip to content

Commit

Permalink
Add regression test for facebook#6119
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon authored and jetoneza committed Jan 23, 2019
1 parent 163f7c2 commit 8f3cd10
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down

0 comments on commit 8f3cd10

Please sign in to comment.