added test to prevent releases w/ console.log
This commit is contained in:
parent
9794c534eb
commit
dc379a4cf8
7 changed files with 18 additions and 2 deletions
|
|
@ -474,6 +474,8 @@ Mithril = m = new function app(window) {
|
||||||
|
|
||||||
//testing API
|
//testing API
|
||||||
m.deps = function(mock) {return window = mock}
|
m.deps = function(mock) {return window = mock}
|
||||||
|
//for internal testing only, do not use `m.deps.factory`
|
||||||
|
m.deps.factory = app
|
||||||
|
|
||||||
return m
|
return m
|
||||||
}(this)
|
}(this)
|
||||||
|
|
@ -1221,6 +1223,11 @@ function testMithril(mock) {
|
||||||
m.endComputation()
|
m.endComputation()
|
||||||
return root.childNodes[0].nodeValue === "foo"
|
return root.childNodes[0].nodeValue === "foo"
|
||||||
})
|
})
|
||||||
|
|
||||||
|
//console.log presence
|
||||||
|
test(function() {
|
||||||
|
return m.deps.factory.toString().indexOf("console") < 0
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//mocks
|
//mocks
|
||||||
|
|
|
||||||
|
|
@ -474,6 +474,8 @@ Mithril = m = new function app(window) {
|
||||||
|
|
||||||
//testing API
|
//testing API
|
||||||
m.deps = function(mock) {return window = mock}
|
m.deps = function(mock) {return window = mock}
|
||||||
|
//for internal testing only, do not use `m.deps.factory`
|
||||||
|
m.deps.factory = app
|
||||||
|
|
||||||
return m
|
return m
|
||||||
}(this)
|
}(this)
|
||||||
|
|
|
||||||
2
archive/v0.1.11/mithril.min.js
vendored
2
archive/v0.1.11/mithril.min.js
vendored
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.
|
|
@ -474,6 +474,8 @@ Mithril = m = new function app(window) {
|
||||||
|
|
||||||
//testing API
|
//testing API
|
||||||
m.deps = function(mock) {return window = mock}
|
m.deps = function(mock) {return window = mock}
|
||||||
|
//for internal testing only, do not use `m.deps.factory`
|
||||||
|
m.deps.factory = app
|
||||||
|
|
||||||
return m
|
return m
|
||||||
}(this)
|
}(this)
|
||||||
|
|
|
||||||
|
|
@ -615,6 +615,11 @@ function testMithril(mock) {
|
||||||
m.endComputation()
|
m.endComputation()
|
||||||
return root.childNodes[0].nodeValue === "foo"
|
return root.childNodes[0].nodeValue === "foo"
|
||||||
})
|
})
|
||||||
|
|
||||||
|
//console.log presence
|
||||||
|
test(function() {
|
||||||
|
return m.deps.factory.toString().indexOf("console") < 0
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//mocks
|
//mocks
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue