Store normalized vnodes in the dom element. Add render tests. (#2266)
* Store normalized vnodes in the dom element. Add render tests. * Add entry to change-log
This commit is contained in:
parent
b9c3c6c9c8
commit
ea0ce7f762
3 changed files with 29 additions and 2 deletions
|
|
@ -12,6 +12,32 @@ o.spec("render", function() {
|
|||
render = vdom($window).render
|
||||
})
|
||||
|
||||
o("renders plain text", function() {
|
||||
render(root, "a")
|
||||
o(root.childNodes.length).equals(1)
|
||||
o(root.childNodes[0].nodeValue).equals("a")
|
||||
})
|
||||
|
||||
o("updates plain text", function() {
|
||||
render(root, "a")
|
||||
render(root, "b")
|
||||
o(root.childNodes.length).equals(1)
|
||||
o(root.childNodes[0].nodeValue).equals("b")
|
||||
})
|
||||
|
||||
o("renders a number", function() {
|
||||
render(root, 1)
|
||||
o(root.childNodes.length).equals(1)
|
||||
o(root.childNodes[0].nodeValue).equals("1")
|
||||
})
|
||||
|
||||
o("updates a number", function() {
|
||||
render(root, 1)
|
||||
render(root, 2)
|
||||
o(root.childNodes.length).equals(1)
|
||||
o(root.childNodes[0].nodeValue).equals("2")
|
||||
})
|
||||
|
||||
o("overwrites existing content", function() {
|
||||
var vnodes = []
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue