docs: Feature/testing docs update (#2012)

This commit is contained in:
David Bindloss 2017-11-04 04:01:19 +11:00 committed by Pat Cavit
parent 021b11eff0
commit deaf01c8e9

View file

@ -74,7 +74,9 @@ var m = require("mithril")
module.exports = { module.exports = {
view: function() { view: function() {
return m("div", "Hello world") return m("div",
m("p", "Hello World")
)
} }
} }
``` ```
@ -90,7 +92,7 @@ o.spec("MyComponent", function() {
o(vnode.tag).equals("div") o(vnode.tag).equals("div")
o(vnode.children.length).equals(1) o(vnode.children.length).equals(1)
o(vnode.children[0].tag).equals("#") o(vnode.children[0].tag).equals("p")
o(vnode.children[0].children).equals("Hello world") o(vnode.children[0].children).equals("Hello world")
}) })
}) })