Added mocked test as well
This commit is contained in:
parent
20b102b478
commit
5a2d7fdf81
1 changed files with 11 additions and 1 deletions
|
|
@ -926,9 +926,19 @@ function testMithril(mock) {
|
|||
test(function() {
|
||||
return m.deps.factory.toString().indexOf("console") < 0
|
||||
})
|
||||
|
||||
// config context
|
||||
test(function() {
|
||||
var root = mock.document.createElement("div")
|
||||
|
||||
var success = false;
|
||||
m.render(root, m("div", {config: function(elem, isInitialized, ctx) {ctx.data=1}}));
|
||||
m.render(root, m("div", {config: function(elem, isInitialized, ctx) {success = ctx.data===1}}));
|
||||
return success;
|
||||
})
|
||||
}
|
||||
|
||||
//mocks
|
||||
testMithril(mock.window)
|
||||
|
||||
test.print(console.log)
|
||||
test.print(console.log)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue