@samitouri / QOS-React-2 / commits / b89f7ebff4

Add unit test: should generate simple markup for attribute with `>` symbol

Jim committed Jul 9, 2015 at 14:26 UTC b89f7ebff44bb6d9417ca2fc0606b91835afb3a7
1 file changed +10
src/renderers/dom/server/__tests__/ReactServerRendering-test.js
+10
@@ -67,6 +67,16 @@ describe('ReactServerRendering', function() {
67 );
68 });
69
70 + it('should generate simple markup for attribute with `>` symbol', function() {
71 + var response = ReactServerRendering.renderToString(
72 + <img data-attr=">" />
73 + );
74 + expect(response).toMatch(
75 + '<img data-attr="&gt;" ' + ID_ATTRIBUTE_NAME + '="[^"]+" ' +
76 + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="[^"]+"/>'
77 + );
78 + });
79 +
80 it('should not register event listeners', function() {
81 var EventPluginHub = require('EventPluginHub');
82 var cb = mocks.getMockFunction();