Skip to content

Commit

Permalink
Couple of more tests for unbalanced pseudo-html tags matching #51
Browse files Browse the repository at this point in the history
  • Loading branch information
tnajdek committed Aug 24, 2017
1 parent ad3ebdd commit 636f043
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/utils.spec.js
Expand Up @@ -47,5 +47,10 @@ describe('utils', function() {
expect(escapeFormattedValue('Lorem <i>some</i> and <b>ipsum</b> and <sup>dolot</sup>')).toEqual('Lorem <i>some</i> and <b>ipsum</b> and <sup>dolot</sup>');
expect(escapeFormattedValue('Lorem <i>some</i> and <i>ipsum</i> and <i>dolot</i>')).toEqual('Lorem <i>some</i> and <i>ipsum</i> and <i>dolot</i>');
});

it('should handle unbalanced tags gracefully', () => {
expect(escapeFormattedValue('Lorem <i>some')).toEqual('Lorem &lt;i&gt;some');
expect(escapeFormattedValue('<i>Lorem <i>some</i>')).toEqual('&lt;i&gt;Lorem <i>some</i>');
});
});
});

0 comments on commit 636f043

Please sign in to comment.