Skip to content

Commit 6b05e99

Browse files
committed
chore: add new test for comment cleanup flow
1 parent 8f1a7cd commit 6b05e99

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/utils/DOMUtils.spec.js

+1
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ describe('DOMUtils#removeCommments tests', () => {
182182
test('<p><!-- useless comment \n multiline --></p>', '<p></p>');
183183
test('<p><!-- useless comment \n multiline \n multiline --></p>', '<p></p>');
184184
test('<!-- useless comment --><p>The content stays</p><!-- another useless comment with \n line break -->', '<p>The content stays</p>');
185+
test('<p>The content and spaces stay</p> <!-- a useless comment preceded by spaces -->', '<p>The content and spaces stay</p> ');
185186
test('<p>This is a paragraph.</p>\n\x3C!--\n<p>Look at this cool image:</p>\n<img border="0" src="pic_trulli.jpg" alt="Trulli">\n-->\n<p>This is a paragraph too.</p>\x3C!-- same line -->\n\x3C!-- single line -->', '<p>This is a paragraph.</p>\n\n<p>This is a paragraph too.</p>\n');
186187
test('<div some-crazy-attribute="" <!--=""><!-- useless comment --></div>', '<div some-crazy-attribute="" <!--=""></div>');
187188
});

0 commit comments

Comments
 (0)