parent
cece44d4ac
commit
a988276e9b
4 changed files with 42 additions and 8 deletions
|
|
@ -576,4 +576,22 @@ o.spec("component", function() {
|
|||
o(vnode.dom).notEquals(updated.dom)
|
||||
})
|
||||
})
|
||||
o.spec("state", function() {
|
||||
o("deep copies state", function() {
|
||||
var called = 0
|
||||
var component = {
|
||||
data: [{a: 1}],
|
||||
oninit: init,
|
||||
view: function() {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
render(root, [{tag: component}])
|
||||
|
||||
function init(vnode) {
|
||||
o(vnode.state.data).deepEquals([{a: 1}])
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue