mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Response to code review comment https://github.com/facebook/react/pull/9264#discussion_r108974871 . Thanks, @spicyj!
This commit is contained in:
@@ -1043,12 +1043,14 @@ describe('ReactDOMServerIntegration', () => {
|
||||
// onChange or readOnly is a mistake.
|
||||
const e = await render(<input value="foo" />, 1);
|
||||
expect(e.value).toBe('foo');
|
||||
expect(e.getAttribute('value')).toBe('foo');
|
||||
},
|
||||
);
|
||||
|
||||
itRenders('an input with a defaultValue', async render => {
|
||||
const e = await render(<input defaultValue="foo" />);
|
||||
expect(e.value).toBe('foo');
|
||||
expect(e.getAttribute('value')).toBe('foo');
|
||||
expect(e.getAttribute('defaultValue')).toBe(null);
|
||||
});
|
||||
|
||||
@@ -1058,6 +1060,7 @@ describe('ReactDOMServerIntegration', () => {
|
||||
1,
|
||||
);
|
||||
expect(e.value).toBe('foo');
|
||||
expect(e.getAttribute('value')).toBe('foo');
|
||||
expect(e.getAttribute('defaultValue')).toBe(null);
|
||||
});
|
||||
|
||||
@@ -1069,6 +1072,7 @@ describe('ReactDOMServerIntegration', () => {
|
||||
1,
|
||||
);
|
||||
expect(e.value).toBe('foo');
|
||||
expect(e.getAttribute('value')).toBe('foo');
|
||||
expect(e.getAttribute('defaultValue')).toBe(null);
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user