From d250908b2771e43eacf95d1f0138e3e2c0b42901 Mon Sep 17 00:00:00 2001 From: Leo Horie Date: Thu, 25 Sep 2014 13:04:05 -0400 Subject: [PATCH] add test for 277 --- tests/mithril-tests.js | 11 +++++++++++ 1 file changed, 11 insertions(+) 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