Tests for m.redraw.sync()

This commit is contained in:
Pierre-Yves Gérardy 2017-06-13 16:29:02 +02:00
parent ccb3d61675
commit 7de0124339
3 changed files with 87 additions and 1 deletions

View file

@ -173,6 +173,14 @@ o.spec("api", function() {
done()
}, FRAME_BUDGET)
})
o("sync", function() {
var root = window.document.createElement("div")
var view = o.spy()
m.mount(root, createComponent({view: view}))
o(view.callCount).equals(1)
m.redraw.sync()
o(view.callCount).equals(2)
})
})
})
})