add docs for SVG, and better tests

This commit is contained in:
Leo Horie 2014-04-10 21:36:09 -04:00
parent 1aef5dd942
commit 5c9f9d782f
9 changed files with 100 additions and 9 deletions

View file

@ -110,7 +110,8 @@ function testMithril(mock) {
test(function() {
var root = mock.document.createElement("div")
m.render(root, m("svg", [m("g")]))
return root.childNodes[0].childNodes[0].nodeName === "G"
var g = root.childNodes[0].childNodes[0]
return g.nodeName === "G" && g.namespaceURI == "http://www.w3.org/2000/svg"
})
test(function() {
var root = mock.document.createElement("div")