Test for #1146
This commit is contained in:
parent
7227cc546f
commit
193b08e10c
1 changed files with 25 additions and 1 deletions
|
|
@ -98,7 +98,7 @@ o.spec("mount", function() {
|
|||
}, FRAME_BUDGET)
|
||||
})
|
||||
|
||||
o("redraws when the render function is run", function(done) {
|
||||
o("redraws when the render function is run", function(done) {
|
||||
var onupdate = o.spy()
|
||||
var oninit = o.spy()
|
||||
|
||||
|
|
@ -123,4 +123,28 @@ o.spec("mount", function() {
|
|||
done()
|
||||
}, FRAME_BUDGET)
|
||||
})
|
||||
|
||||
o("updates when new mounts are instantiated", function(done) {
|
||||
var onupdate = o.spy()
|
||||
|
||||
mount(root, {
|
||||
view : function() {
|
||||
return m("div", {
|
||||
onupdate : onupdate,
|
||||
oncreate : function( node ){
|
||||
mount(node.dom, {
|
||||
view : function(){
|
||||
return m("div", {
|
||||
oncreate : function(){
|
||||
o(onupdate.callCount).equals(1)
|
||||
done()
|
||||
}
|
||||
} )
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue