mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
Fix a spec description and verify console.error output
This commit is contained in:
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"'
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user