Skip to content

Commit dc40c7c

Browse files
committed
tests for texts
1 parent 43ab5da commit dc40c7c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,12 @@ describe('PostHTML-Parser test', function() {
3737
tag: 'div', attrs: { id: 'id', class: 'class'} }
3838
]);
3939
});
40+
41+
it('should be parse text', function() {
42+
expect(parser('Text')).to.eql(['Text']);
43+
});
44+
45+
it('should be parse text in content', function() {
46+
expect(parser('<div>Text</div>')).to.eql([{ tag: 'div', content: ['Text'] }]);
47+
});
4048
});

0 commit comments

Comments
 (0)