Browse Source

Tests: Formatting in console-wrapper

Takahiro 4 years ago
parent
commit
9af037c8fa
1 changed files with 20 additions and 10 deletions
  1. 20 10
      test/unit/utils/console-wrapper.js

+ 20 - 10
test/unit/utils/console-wrapper.js

@@ -12,11 +12,11 @@
 
 export const CONSOLE_LEVEL = {
 	OFF : 0,
-    ERROR : 1,
-    WARN : 2,
-    LOG : 3,
-    INFO : 4,
-    DEBUG : 5,
+	ERROR : 1,
+	WARN : 2,
+	LOG : 3,
+	INFO : 4,
+	DEBUG : 5,
 	ALL: 6,
 	DEFAULT: 6
 };
@@ -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 );
+
 };