Use a test case that demonstrates the fix.
Eric O'Connell committed
Jul 9, 2015 at 14:56 UTC
0941cc9884e0a1a91fd1bc0ba8b4cff271a5eb14
1 file changed
+6
-4
src/renderers/dom/client/__tests__/ReactMount-test.js
+6
-4
@@ -159,16 +159,18 @@ describe('ReactMount', function() {
159
it('should account for escaping on a checksum mismatch', function () {
160
var div = document.createElement('div');
161
var markup = React.renderToString(
162
- <div>This markup contains an html entity: & server text</div>);
162
+ <div>This markup contains an nbsp entity: server text</div>);
163
div.innerHTML = markup;
164
165
spyOn(console, 'error');
166
React.render(
167
- <div>This markup contains an html entity: & client text</div>, div);
167
+ <div>This markup contains an nbsp entity: client text</div>,
168
+ div
169
+ );
170
expect(console.error.calls.length).toBe(1);
171
expect(console.error.calls[0].args[0]).toContain(
170
- ' (client) html entity: & client text</div>\n' +
171
- ' (server) html entity: & server text</div>'
172
+ ' (client) nbsp entity: client text</div>\n' +
173
+ ' (server) nbsp entity: server text</div>'
174
);
175
});
176