Allow xlink:href to get removed, fix option.value in mock

This commit is contained in:
Isiah Meadows 2017-10-01 19:26:43 -04:00
parent e36a8db9d4
commit 348bed0a7e
6 changed files with 30 additions and 11 deletions

View file

@ -376,15 +376,15 @@ o.spec("attributes", function() {
o(a.dom.value).equals("1")
})
o("null becomes the empty string", function() {
o("null becomes 'null'", function() {
var a = {tag: "option", attrs: {value: null}}
var b = {tag: "option", attrs: {value: "test"}}
var c = {tag: "option", attrs: {value: null}}
render(root, [a]);
o(a.dom.value).equals("")
o(a.dom.getAttribute("value")).equals("")
o(a.dom.value).equals("null")
o(a.dom.getAttribute("value")).equals("null")
render(root, [b]);
@ -393,8 +393,8 @@ o.spec("attributes", function() {
render(root, [c]);
o(c.dom.value).equals("")
o(c.dom.getAttribute("value")).equals("")
o(c.dom.value).equals("null")
o(c.dom.getAttribute("value")).equals("null")
})
o("'' and 0 are different values", function() {
var a = {tag: "option", attrs: {value: 0}, children:[{tag:"#", children:""}]}