mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 17:44:52 -04:00
unit tests
This commit is contained in:
parent
32df76bdff
commit
66759a33fa
12 changed files with 78 additions and 50 deletions
10
js/logger.js
10
js/logger.js
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue