Added mocked test as well

This commit is contained in:
Sergey Kirillov 2014-05-31 13:49:24 +03:00
parent 20b102b478
commit 5a2d7fdf81

View file

@ -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