Add a test for unmounting.
This commit is contained in:
parent
56fbda9670
commit
37e7b67a49
1 changed files with 14 additions and 0 deletions
|
|
@ -32,6 +32,20 @@ o.spec("mount", function() {
|
|||
o(root.firstChild.nodeName).equals("DIV")
|
||||
})
|
||||
|
||||
o("mounting null deletes `redraw` from `root`", function() {
|
||||
mount(root, {
|
||||
view : function() {
|
||||
return m("div")
|
||||
}
|
||||
})
|
||||
|
||||
o(typeof root.redraw).equals('function')
|
||||
|
||||
mount(root, null)
|
||||
|
||||
o(typeof root.redraw).equals('undefined')
|
||||
})
|
||||
|
||||
o("redraws on events", function(done) {
|
||||
var onupdate = o.spy()
|
||||
var oninit = o.spy()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue