mirror of
https://github.com/danbulant/node-html-parser
synced 2026-06-20 07:01:57 +00:00
fix testes to expect the same behaviout as browsers
This commit is contained in:
parent
6aba0280bf
commit
9257f300b9
1 changed files with 4 additions and 4 deletions
|
|
@ -300,8 +300,8 @@ describe('HTML Parser', function () {
|
||||||
var root = parseHTML('<p a=12 data-id="!$$&" yAz=\'1\'></p>');
|
var root = parseHTML('<p a=12 data-id="!$$&" yAz=\'1\'></p>');
|
||||||
root.firstChild.rawAttributes.should.eql({
|
root.firstChild.rawAttributes.should.eql({
|
||||||
'a': '12',
|
'a': '12',
|
||||||
'data-id': '"!$$&"',
|
'data-id': '!$$&',
|
||||||
'yAz': '\'1\''
|
'yAz': '1'
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
@ -335,7 +335,7 @@ describe('HTML Parser', function () {
|
||||||
'a': '12',
|
'a': '12',
|
||||||
'b': '13',
|
'b': '13',
|
||||||
});
|
});
|
||||||
root.firstChild.toString().should.eql('<p a=12 b=13></p>');
|
root.firstChild.toString().should.eql('<p a="12" b="13"></p>');
|
||||||
});
|
});
|
||||||
it('should remove an attribute from the element', function () {
|
it('should remove an attribute from the element', function () {
|
||||||
var root = parseHTML('<p a=12 b=13 c=14></p>');
|
var root = parseHTML('<p a=12 b=13 c=14></p>');
|
||||||
|
|
@ -344,7 +344,7 @@ describe('HTML Parser', function () {
|
||||||
root.firstChild.attributes.should.eql({
|
root.firstChild.attributes.should.eql({
|
||||||
'a': '12',
|
'a': '12',
|
||||||
});
|
});
|
||||||
root.firstChild.toString().should.eql('<p a=12></p>');
|
root.firstChild.toString().should.eql('<p a="12"></p>');
|
||||||
});
|
});
|
||||||
it('should keep quotes arount value', function () {
|
it('should keep quotes arount value', function () {
|
||||||
var root = parseHTML('<p a="12"></p>');
|
var root = parseHTML('<p a="12"></p>');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue