add tests, pull #23

This commit is contained in:
taoqf 2020-03-11 10:53:43 +08:00
parent 63bd25a758
commit 9a48e032f1

View file

@ -374,6 +374,8 @@ describe('HTML Parser', function () {
'b': '13',
});
root.firstChild.toString().should.eql('<p a="12" b="13"></p>');
root.firstChild.setAttribute('required', '');
root.firstChild.toString().should.eql('<p a="12" b="13" required=""></p>');
});
it('should convert value to string', function () {
const root = parseHTML('<p a=12 b=13 c=14></p>');