Comparing version 0.14.2 to 0.14.3
@@ -6,2 +6,14 @@ # Change Log | ||
<a name="0.14.3"></a> | ||
## [0.14.3](https://github.com/Igmat/baset/compare/v0.14.2...v0.14.3) (2018-10-07) | ||
### Bug Fixes | ||
* **cli:** handle errors properly for tap output ([f83e47a](https://github.com/Igmat/baset/commit/f83e47a)) | ||
<a name="0.14.2"></a> | ||
@@ -8,0 +20,0 @@ ## [0.14.2](https://github.com/Igmat/baset/compare/v0.14.1...v0.14.2) (2018-09-17) |
@@ -11,2 +11,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const baset_core_1 = require("baset-core"); | ||
const stream_1 = require("stream"); | ||
@@ -54,16 +55,32 @@ function serializeError(err) { | ||
if (!options.passed && !options.todo) { | ||
const obj = serializeError(options.error); | ||
output.push([ | ||
' ---', | ||
` name: ${obj.name}`, | ||
` message: ${obj.message}`, | ||
` at: ${obj.at}`, | ||
' actual:', | ||
' |', | ||
` ${obj.actual}`, | ||
' expected:', | ||
' |', | ||
` ${obj.expected}`, | ||
' ...', | ||
].join('\n')); | ||
const errors = Array.isArray(options.error) | ||
? options.error | ||
: [options.error]; | ||
errors.forEach(error => { | ||
const obj = serializeError(error instanceof baset_core_1.TestError | ||
? error | ||
: { | ||
name: error.name, | ||
message: error.message, | ||
stack: error.stack, | ||
data: { | ||
actual: '', | ||
expected: '', | ||
}, | ||
}); | ||
!(error instanceof baset_core_1.TestError) && output.push(error.stack); | ||
output.push([ | ||
' ---', | ||
` name: ${obj.name}`, | ||
` message: ${obj.message}`, | ||
` at: ${obj.at}`, | ||
' actual:', | ||
' |', | ||
` ${obj.actual}`, | ||
' expected:', | ||
' |', | ||
` ${obj.expected}`, | ||
' ...', | ||
].join('\n')); | ||
}); | ||
} | ||
@@ -70,0 +87,0 @@ return output.filter(Boolean).join('\n') + '\n'; |
{ | ||
"name": "baset-cli", | ||
"version": "0.14.2", | ||
"version": "0.14.3", | ||
"description": "CLI for BaseT project.", | ||
@@ -37,3 +37,3 @@ "keywords": [ | ||
"dependencies": { | ||
"baset-core": "^0.14.2", | ||
"baset-core": "^0.14.3", | ||
"find-up": "^3.0.0", | ||
@@ -45,3 +45,3 @@ "glob": "^7.1.3", | ||
}, | ||
"gitHead": "f778d3ecb4cdc64d3e489723529bf9a23f01d64d" | ||
"gitHead": "7c9e10ac30215b5320a76c819a3da1c793bb0f4d" | ||
} |
Sorry, the diff of this file is not supported yet
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
38318
442
Updatedbaset-core@^0.14.3