From 636f0438ea8ab259666dcb73b4817597944227c5 Mon Sep 17 00:00:00 2001 From: Tom Najdek Date: Thu, 24 Aug 2017 19:47:31 +0100 Subject: [PATCH] Couple of more tests for unbalanced pseudo-html tags matching #51 --- test/utils.spec.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/utils.spec.js b/test/utils.spec.js index e363631..fc9a64c 100644 --- a/test/utils.spec.js +++ b/test/utils.spec.js @@ -47,5 +47,10 @@ describe('utils', function() { expect(escapeFormattedValue('Lorem some and ipsum and dolot')).toEqual('Lorem some and ipsum and dolot'); expect(escapeFormattedValue('Lorem some and ipsum and dolot')).toEqual('Lorem some and ipsum and dolot'); }); + + it('should handle unbalanced tags gracefully', () => { + expect(escapeFormattedValue('Lorem some')).toEqual('Lorem <i>some'); + expect(escapeFormattedValue('Lorem some')).toEqual('<i>Lorem some'); + }); }); });