Fix a spec description and verify console.error output

This commit is contained in:
Toru Kobayashi committed 2017-12-04 08:29:58 +09:00
1 parent c04a922cce
commit c4f88f46f1
1 file changed
+4 -1
@@ -372,7 +372,7 @@ describe('ReactDOMServer', () => {
expect(element.firstChild.focus).not.toHaveBeenCalled();
});
it('should not focus on either server or client with autofocus={false} even if the markup is mismatch', () => {
it('should not focus on either server or client with autofocus={false} even if there is a markup mismatch', () => {
spyOnDev(console, 'error');
var element = document.createElement('div');
@@ -387,6 +387,9 @@ describe('ReactDOMServer', () => {
expect(element.firstChild.focus).not.toHaveBeenCalled();
if (__DEV__) {
expect(console.error.calls.count()).toBe(1);
expect(console.error.calls.argsFor(0)[0]).toBe(
'Warning: Text content did not match. Server: "server" Client: "client"'
);
}
});