This commit is contained in:
Barney Carroll 2016-07-14 14:09:04 +01:00
parent 7227cc546f
commit 193b08e10c

View file

@ -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()
}
} )
}
})
}
})
}
})
})
})