Merge pull request #4327 from jimfb/markup-unit-test

Add unit test: should generate simple markup for attribute with `>` symbol
This commit is contained in:
Jim committed 2015-07-09 15:05:08 -07:00
commit cf164f1aa2
1 file changed
+10
@@ -67,6 +67,16 @@ describe('ReactServerRendering', function() {
);
});
it('should generate simple markup for attribute with `>` symbol', function() {
var response = ReactServerRendering.renderToString(
<img data-attr=">" />
);
expect(response).toMatch(
'<img data-attr="&gt;" ' + ID_ATTRIBUTE_NAME + '="[^"]+" ' +
ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="[^"]+"/>'
);
});
it('should not register event listeners', function() {
var EventPluginHub = require('EventPluginHub');
var cb = mocks.getMockFunction();