document test

This commit is contained in:
Leo Horie 2014-04-13 13:58:59 -04:00
parent b6828c22bd
commit 7fbfe2c3ca
3 changed files with 4 additions and 0 deletions

View file

@ -786,12 +786,14 @@ function testMithril(mock) {
return result
})
test(function() {
//https://github.com/lhorie/mithril.js/issues/49
var root = mock.document.createElement("div")
m.render(root, m("a", "test"))
m.render(root, m("a.foo", "test"))
return root.childNodes[0].childNodes[0].nodeValue === "test"
})
test(function() {
//https://github.com/lhorie/mithril.js/issues/49
var root = mock.document.createElement("div")
m.render(root, m("a.foo", "test"))
m.render(root, m("a", "test"))

Binary file not shown.

View file

@ -225,12 +225,14 @@ function testMithril(mock) {
return result
})
test(function() {
//https://github.com/lhorie/mithril.js/issues/49
var root = mock.document.createElement("div")
m.render(root, m("a", "test"))
m.render(root, m("a.foo", "test"))
return root.childNodes[0].childNodes[0].nodeValue === "test"
})
test(function() {
//https://github.com/lhorie/mithril.js/issues/49
var root = mock.document.createElement("div")
m.render(root, m("a.foo", "test"))
m.render(root, m("a", "test"))