@travetto/test
Advanced tools
Comparing version 0.0.75 to 0.0.76
@@ -30,3 +30,3 @@ { | ||
}, | ||
"version": "0.0.75" | ||
"version": "0.0.76" | ||
} |
@@ -74,3 +74,3 @@ import { AppEnv, isPlainObject, isFunction, isPrimitive } from '@travetto/base'; | ||
const outFile = file.split(base.replace(/^[A-Za-z]:/, ''))[1].replace(/^[\\\/]/, '')[1]; | ||
const outFile = file.split(base.replace(/^[A-Za-z]:/, ''))[1].replace(/^[\\\/]/, ''); | ||
@@ -77,0 +77,0 @@ const res = { file: outFile, line: parseInt(lineNo, 10) }; |
import * as util from 'util'; | ||
import { simplifyStack } from '@travetto/base'; | ||
@@ -16,3 +17,11 @@ const OG_CONSOLE = { | ||
static log(level: string, ...args: any[]) { | ||
const msg = args.map((x: any) => typeof x === 'string' ? x : util.inspect(x, false, 4)).join(' '); | ||
const msg = args.map((x: any) => { | ||
if (x instanceof Error) { | ||
return simplifyStack(x); | ||
} else if (typeof x === 'string') { | ||
return x; | ||
} else { | ||
return util.inspect(x, false, 4); | ||
} | ||
}).join(' '); | ||
this.out[level] = `${this.out[level] || ''}${msg}\n`; | ||
@@ -19,0 +28,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
51229
1441