docs: Feature/testing docs update (#2012)
This commit is contained in:
parent
021b11eff0
commit
deaf01c8e9
1 changed files with 4 additions and 2 deletions
|
|
@ -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")
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue