add more tests for #49

This commit is contained in:
Leo Horie 2014-04-13 16:21:07 -04:00
parent d7623455ff
commit e5f0d7cebb
3 changed files with 28 additions and 0 deletions

View file

@ -799,6 +799,20 @@ function testMithril(mock) {
m.render(root, m("a", "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", "test1"))
return root.childNodes[0].childNodes[0].nodeValue === "test1"
})
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", "test1"))
return root.childNodes[0].childNodes[0].nodeValue === "test1"
})
//end m.render
//m.redraw

Binary file not shown.

View file

@ -238,6 +238,20 @@ function testMithril(mock) {
m.render(root, m("a", "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", "test1"))
return root.childNodes[0].childNodes[0].nodeValue === "test1"
})
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", "test1"))
return root.childNodes[0].childNodes[0].nodeValue === "test1"
})
//end m.render
//m.redraw