Skip to content

Commit aa8d0e3

Browse files
committed
test(test): add test for issue #11
1 parent ee1f515 commit aa8d0e3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ describe('PostHTML-Parser test', function() {
5858
expect(parser('<!--comment-->')).to.eql(['<!--comment-->']);
5959
});
6060

61+
it('should be parse comment', function() {
62+
expect(parser('<script><![CDATA[console.log(1);]]></script>', {xmlMode: true}))
63+
.to.eql([{tag: 'script', content: ['console.log(1);']}]);
64+
});
65+
6166
it('should be parse comment in content', function() {
6267
expect(parser('<div><!--comment--></div>')).to.eql([{tag: 'div', content: ['<!--comment-->']}]);
6368
});

0 commit comments

Comments
 (0)