added test to prevent releases w/ console.log

This commit is contained in:
Leo Horie 2014-05-03 08:20:30 -04:00
parent 9794c534eb
commit dc379a4cf8
7 changed files with 18 additions and 2 deletions

View file

@ -474,6 +474,8 @@ Mithril = m = new function app(window) {
//testing API
m.deps = function(mock) {return window = mock}
//for internal testing only, do not use `m.deps.factory`
m.deps.factory = app
return m
}(this)
@ -1221,6 +1223,11 @@ function testMithril(mock) {
m.endComputation()
return root.childNodes[0].nodeValue === "foo"
})
//console.log presence
test(function() {
return m.deps.factory.toString().indexOf("console") < 0
})
}
//mocks

View file

@ -474,6 +474,8 @@ Mithril = m = new function app(window) {
//testing API
m.deps = function(mock) {return window = mock}
//for internal testing only, do not use `m.deps.factory`
m.deps.factory = app
return m
}(this)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

View file

@ -474,6 +474,8 @@ Mithril = m = new function app(window) {
//testing API
m.deps = function(mock) {return window = mock}
//for internal testing only, do not use `m.deps.factory`
m.deps.factory = app
return m
}(this)

View file

@ -615,6 +615,11 @@ function testMithril(mock) {
m.endComputation()
return root.childNodes[0].nodeValue === "foo"
})
//console.log presence
test(function() {
return m.deps.factory.toString().indexOf("console") < 0
})
}
//mocks