unit tests

This commit is contained in:
Karsten Hassel 2021-06-06 23:13:09 +02:00
parent 32df76bdff
commit 66759a33fa
12 changed files with 78 additions and 50 deletions

View file

@ -22,7 +22,8 @@
root.Log = factory(root.config);
}
})(this, function (config) {
const logLevel = {
let logLevel = {
debug: Function.prototype.bind.call(console.debug, console),
log: Function.prototype.bind.call(console.log, console),
info: Function.prototype.bind.call(console.info, console),
@ -32,8 +33,11 @@
groupCollapsed: Function.prototype.bind.call(console.groupCollapsed, console),
groupEnd: Function.prototype.bind.call(console.groupEnd, console),
time: Function.prototype.bind.call(console.time, console),
timeEnd: Function.prototype.bind.call(console.timeEnd, console),
timeStamp: Function.prototype.bind.call(console.timeStamp, console)
timeEnd: Function.prototype.bind.call(console.timeEnd, console)
};
if (process.env.NODE_ENV.trim() !== "test") {
logLevel.push({timeStamp: Function.prototype.bind.call(console.timeStamp, console)});
};
logLevel.setLogLevel = function (newLevel) {