fix class removal
This commit is contained in:
parent
f0888ac7bd
commit
b9244f4c21
2 changed files with 12 additions and 0 deletions
|
|
@ -56,6 +56,17 @@ o.spec("updateElement", function() {
|
|||
o(updated.dom).equals(root.firstChild)
|
||||
o("title" in updated.dom.attributes).equals(false)
|
||||
})
|
||||
o("removes class", function() {
|
||||
var vnode = {tag: "a", attrs: {id: "b", className: "d"}}
|
||||
var updated = {tag: "a", attrs: {id: "c"}}
|
||||
|
||||
render(root, [vnode])
|
||||
render(root, [updated])
|
||||
|
||||
o(updated.dom).equals(vnode.dom)
|
||||
o(updated.dom).equals(root.firstChild)
|
||||
o("class" in updated.dom.attributes).equals(false)
|
||||
})
|
||||
o("creates style object", function() {
|
||||
var vnode = {tag: "a", attrs: {}}
|
||||
var updated = {tag: "a", attrs: {style: {backgroundColor: "green"}}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue