#1281 fixed recyling edge case

This commit is contained in:
Leo Horie 2016-10-04 16:33:57 -04:00
parent 59e4e8ff26
commit 730c960416
5 changed files with 85 additions and 63 deletions

View file

@ -148,7 +148,6 @@ o.spec("oninit", function() {
render(root, [])
render(root, [updated])
o(vnode.dom).equals(updated.dom)
o(create.callCount).equals(1)
o(create.this).equals(vnode.state)
o(create.args[0]).equals(vnode)
@ -201,16 +200,4 @@ o.spec("oninit", function() {
o(vnode.dom.oninit).equals(undefined)
o(vnode.dom.attributes["oninit"]).equals(undefined)
})
o("calls oninit on recycle", function() {
var create = o.spy()
var vnodes = [{tag: "div", key: 1, attrs: {oninit: create}}]
var temp = []
var updated = [{tag: "div", key: 1, attrs: {oninit: create}}]
render(root, vnodes)
render(root, temp)
render(root, updated)
o(create.callCount).equals(2)
})
})