Validate the DOM node passed to render

This commit is contained in:
Pierre-Yves Gerardy 2016-09-09 15:02:54 +02:00
parent 2c93e4995e
commit b8673f2ff5
4 changed files with 30 additions and 0 deletions

View file

@ -22,6 +22,16 @@ o.spec("mount", function() {
render = coreRenderer($window).render
})
o("throws on invalid `root` DOM node", function() {
var threw = false
try {
mount(null, {view: function() {}})
} catch (e) {
threw = true
}
o(threw).equals(true)
})
o("renders into `root`", function() {
mount(root, {
view : function() {