Skip to content

Commit

Permalink
Tests: Formatting in console-wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
takahirox committed Nov 29, 2020
1 parent 688c604 commit 8c9a403
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions test/unit/utils/console-wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,31 @@ console._debug = console.debug;

// Wrap console methods
console.error = function () {
if (this.level >= CONSOLE_LEVEL.ERROR) this._error.apply(this, arguments);

if ( this.level >= CONSOLE_LEVEL.ERROR ) this._error.apply( this, arguments );

};

console.warn = function () {
if (this.level >= CONSOLE_LEVEL.WARN) this._warn.apply(this, arguments);

if ( this.level >= CONSOLE_LEVEL.WARN ) this._warn.apply( this, arguments );

};

console.log = function () {
if (this.level >= CONSOLE_LEVEL.LOG) this._log.apply(this, arguments);

if ( this.level >= CONSOLE_LEVEL.LOG ) this._log.apply( this, arguments );

};

console.info = function () {
if (this.level >= CONSOLE_LEVEL.INFO) this._info.apply(this, arguments);

if ( this.level >= CONSOLE_LEVEL.INFO ) this._info.apply( this, arguments );

};

console.debug = function () {
if (this.level >= CONSOLE_LEVEL.DEBUG) this._debug.apply(this, arguments);

if ( this.level >= CONSOLE_LEVEL.DEBUG ) this._debug.apply( this, arguments );

};

0 comments on commit 8c9a403

Please sign in to comment.