Response to code review comment https://github.com/facebook/react/pull/9264#discussion_r108974871 . Thanks, @spicyj!
Sasha Aickin committed
Mar 31, 2017 at 14:49 UTC
a734aecc983bc484845ce2a34c2fe4bbd0f16b18
1 file changed
+4
src/renderers/dom/shared/__tests__/ReactDOMServerIntegration-test.js
+4
@@ -1043,12 +1043,14 @@ describe('ReactDOMServerIntegration', () => {
1043
// onChange or readOnly is a mistake.
1044
const e = await render(<input value="foo" />, 1);
1045
expect(e.value).toBe('foo');
1046
+ expect(e.getAttribute('value')).toBe('foo');
1047
},
1048
);
1049
1050
itRenders('an input with a defaultValue', async render => {
1051
const e = await render(<input defaultValue="foo" />);
1052
expect(e.value).toBe('foo');
1053
+ expect(e.getAttribute('value')).toBe('foo');
1054
expect(e.getAttribute('defaultValue')).toBe(null);
1055
});
1056
@@ -1058,6 +1060,7 @@ describe('ReactDOMServerIntegration', () => {
1060
1,
1061
);
1062
expect(e.value).toBe('foo');
1063
+ expect(e.getAttribute('value')).toBe('foo');
1064
expect(e.getAttribute('defaultValue')).toBe(null);
1065
});
1066
@@ -1069,6 +1072,7 @@ describe('ReactDOMServerIntegration', () => {
1072
1,
1073
);
1074
expect(e.value).toBe('foo');
1075
+ expect(e.getAttribute('value')).toBe('foo');
1076
expect(e.getAttribute('defaultValue')).toBe(null);
1077
},
1078
);