Remove console.log implementation that renders to the page from utils (was there to debug mobile)
This commit is contained in:
parent
68a3a645fc
commit
76ad832567
|
@ -11,46 +11,6 @@ function cont(value_to_test, fn) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function text(s) {
|
|
||||||
return document.createTextNode(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
function prepend(elem, children) {
|
|
||||||
var child = elem.firstChild;
|
|
||||||
|
|
||||||
if (child) {
|
|
||||||
elem.insertBefore(children, child);
|
|
||||||
} else {
|
|
||||||
elem.appendChild(children);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function _log() {
|
|
||||||
for (var arg of arguments) {
|
|
||||||
if (arg == null) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
var pre = document.createElement('pre');
|
|
||||||
pre.appendChild(text(arg.toString()));
|
|
||||||
document.body.appendChild(pre);
|
|
||||||
try {
|
|
||||||
prepend(document.body, pre);
|
|
||||||
} catch (e) {
|
|
||||||
var pre = document.createElement('pre');
|
|
||||||
pre.appendChild(text(e.toString()));
|
|
||||||
document.body.appendChild(pre);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var console = {
|
|
||||||
log: _log,
|
|
||||||
error: _log
|
|
||||||
};
|
|
||||||
|
|
||||||
const assert = {
|
const assert = {
|
||||||
"equal": (actual, expected, message="No message set") => {
|
"equal": (actual, expected, message="No message set") => {
|
||||||
if (actual !== expected) {
|
if (actual !== expected) {
|
||||||
|
|
Loading…
Reference in New Issue