changed the tests to expect that m.module returns the instance of module.controller that was passed to it
This commit is contained in:
parent
343687d5f2
commit
445087c606
1 changed files with 4 additions and 3 deletions
|
|
@ -34,20 +34,21 @@ function testMithril(mock) {
|
|||
mock.requestAnimationFrame.$resolve()
|
||||
|
||||
var root1 = mock.document.createElement("div")
|
||||
m.module(root1, {
|
||||
var mod1 = m.module(root1, {
|
||||
controller: function() {this.value = "test1"},
|
||||
view: function(ctrl) {return ctrl.value}
|
||||
})
|
||||
|
||||
var root2 = mock.document.createElement("div")
|
||||
m.module(root2, {
|
||||
var mod2 = m.module(root2, {
|
||||
controller: function() {this.value = "test2"},
|
||||
view: function(ctrl) {return ctrl.value}
|
||||
})
|
||||
|
||||
mock.requestAnimationFrame.$resolve()
|
||||
|
||||
return root1.childNodes[0].nodeValue === "test1" && root2.childNodes[0].nodeValue === "test2"
|
||||
return (root1.childNodes[0].nodeValue === "test1" && root2.childNodes[0].nodeValue === "test2")
|
||||
&& (mod1.value && mod1.value === "test1") && (mod2.value && mod2.value === "test2")
|
||||
})
|
||||
|
||||
//m.withAttr
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue