Render booleans as empty strings
This commit is contained in:
parent
8ee75924c8
commit
c98f663653
3 changed files with 38 additions and 2 deletions
|
|
@ -11,7 +11,7 @@
|
|||
test(function () { return m(".foo").attrs.className === "foo" })
|
||||
test(function () { return m("[title=bar]").tag === "div" })
|
||||
test(function () { return m("[title=bar]").attrs.title === "bar" })
|
||||
test(function () { return m("[empty]").attrs.empty === "" })
|
||||
test(function () { return m("[empty]").attrs.empty === true })
|
||||
test(function () { return m("[title=\'bar\']").attrs.title === "bar" })
|
||||
test(function () { return m("[title=\"bar\"]").attrs.title === "bar" })
|
||||
test(function () { return m("div", "test").children[0] === "test" })
|
||||
|
|
@ -1750,6 +1750,24 @@
|
|||
return root.childNodes[0].childNodes[0].nodeValue === ""
|
||||
})
|
||||
|
||||
test(function () {
|
||||
var root = mock.document.createElement("div")
|
||||
m.render(root, m("div", [null]))
|
||||
return root.childNodes[0].childNodes[0].nodeValue === ""
|
||||
})
|
||||
|
||||
test(function () {
|
||||
var root = mock.document.createElement("div")
|
||||
m.render(root, m("div", [true]))
|
||||
return root.childNodes[0].childNodes[0].nodeValue === ""
|
||||
})
|
||||
|
||||
test(function () {
|
||||
var root = mock.document.createElement("div")
|
||||
m.render(root, m("div", [false]))
|
||||
return root.childNodes[0].childNodes[0].nodeValue === ""
|
||||
})
|
||||
|
||||
test(function () {
|
||||
var root = mock.document.createElement("div")
|
||||
m.render(root, m("svg", [m("g")]))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue