Use a test case that demonstrates the fix.
This commit is contained in:
parent
902b607f1f
commit
0941cc9884
|
@ -159,16 +159,18 @@ describe('ReactMount', function() {
|
|||
it('should account for escaping on a checksum mismatch', function () {
|
||||
var div = document.createElement('div');
|
||||
var markup = React.renderToString(
|
||||
<div>This markup contains an html entity: & server text</div>);
|
||||
<div>This markup contains an nbsp entity: server text</div>);
|
||||
div.innerHTML = markup;
|
||||
|
||||
spyOn(console, 'error');
|
||||
React.render(
|
||||
<div>This markup contains an html entity: & client text</div>, div);
|
||||
<div>This markup contains an nbsp entity: client text</div>,
|
||||
div
|
||||
);
|
||||
expect(console.error.calls.length).toBe(1);
|
||||
expect(console.error.calls[0].args[0]).toContain(
|
||||
' (client) html entity: & client text</div>\n' +
|
||||
' (server) html entity: & server text</div>'
|
||||
' (client) nbsp entity: client text</div>\n' +
|
||||
' (server) nbsp entity: server text</div>'
|
||||
);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue