diff --git a/tests/mithril-tests.js b/tests/mithril-tests.js index 96f2a3b6..68fcf009 100644 --- a/tests/mithril-tests.js +++ b/tests/mithril-tests.js @@ -752,6 +752,17 @@ function testMithril(mock) { m.render(root, [m("div.green", [m("div")]), m("div.blue")]) return root.childNodes.length == 2 }) + test(function() { + //https://github.com/lhorie/mithril.js/issues/277 + var root = mock.document.createElement("div") + function Field() { + this.tag = "div"; + this.attrs = {}; + this.children = "hello"; + } + m.render(root, new Field()) + return root.childNodes.length == 1 + }) //end m.render //m.redraw