add more tests for #49
This commit is contained in:
parent
d7623455ff
commit
e5f0d7cebb
3 changed files with 28 additions and 0 deletions
|
|
@ -799,6 +799,20 @@ function testMithril(mock) {
|
||||||
m.render(root, m("a", "test"))
|
m.render(root, m("a", "test"))
|
||||||
return root.childNodes[0].childNodes[0].nodeValue === "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
|
//end m.render
|
||||||
|
|
||||||
//m.redraw
|
//m.redraw
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -238,6 +238,20 @@ function testMithril(mock) {
|
||||||
m.render(root, m("a", "test"))
|
m.render(root, m("a", "test"))
|
||||||
return root.childNodes[0].childNodes[0].nodeValue === "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
|
//end m.render
|
||||||
|
|
||||||
//m.redraw
|
//m.redraw
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue