From 3eb4bfc6a600d28feeed5d1a5a36025b2c0f1da1 Mon Sep 17 00:00:00 2001 From: Leo Horie Date: Wed, 9 Apr 2014 09:18:59 -0400 Subject: [PATCH] add test for textnode->element and element->textnode --- archive/v0.1.4/mithril-tests.js | 14 ++++++++++++++ archive/v0.1.4/mithril.min.zip | Bin 21025 -> 21025 bytes tests/mithril-tests.js | 14 ++++++++++++++ 3 files changed, 28 insertions(+) diff --git a/archive/v0.1.4/mithril-tests.js b/archive/v0.1.4/mithril-tests.js index 06ce9c2d..a056c081 100644 --- a/archive/v0.1.4/mithril-tests.js +++ b/archive/v0.1.4/mithril-tests.js @@ -720,6 +720,20 @@ function testMithril(mock) { m.render(root, m("#foo", [m("div"), m("#bar")])) return root.childNodes[0].childNodes[0].nodeName === "DIV" }) + test(function() { + //https://github.com/lhorie/mithril.js/issues/44 + var root = mock.document.createElement("div") + m.render(root, m("#foo", ["test", m("#bar")])) + m.render(root, m("#foo", [m("div"), m("#bar")])) + return root.childNodes[0].childNodes[0].nodeName === "DIV" + }) + test(function() { + //https://github.com/lhorie/mithril.js/issues/44 + var root = mock.document.createElement("div") + m.render(root, m("#foo", [m("div"), m("#bar")])) + m.render(root, m("#foo", ["test", m("#bar")])) + return root.childNodes[0].childNodes[0].nodeValue === "test" + }) //m.redraw test(function() { diff --git a/archive/v0.1.4/mithril.min.zip b/archive/v0.1.4/mithril.min.zip index 46d8d463f32a9d4340120ecc274d604eb69269d4..ef45d77139eaa7c749be37d12e6d821b5bd2d915 100644 GIT binary patch delta 45 vcmZ3ugmK{#MxFp~W)?065b*Qb$RjV$