Added mocked test as well
This commit is contained in:
parent
20b102b478
commit
5a2d7fdf81
1 changed files with 11 additions and 1 deletions
|
|
@ -926,6 +926,16 @@ function testMithril(mock) {
|
||||||
test(function() {
|
test(function() {
|
||||||
return m.deps.factory.toString().indexOf("console") < 0
|
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
|
//mocks
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue