Skip to content

Commit ca86fba

Browse files
committed
test comments
1 parent b4b6571 commit ca86fba

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/test.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ var tree = require('./templates/parser.js');
99

1010
describe('PostHTML-Parser test', function() {
1111
it('html to tree', function() {
12-
expect(tree).to.eql(parser(html));
12+
expect(parser(html)).to.eql(tree);
13+
});
14+
15+
it('comment', function() {
16+
expect(parser('<div><!--comment--></div>')).to.eql([{tag: 'div', content: ['<!--comment-->']}]);
17+
});
18+
19+
it('last comment', function() {
20+
expect(parser('<!--comment-->')).to.eql(['<!--comment-->']);
1321
});
1422
});

0 commit comments

Comments
 (0)