test-machinepack
Advanced tools
Comparing version 2.1.1 to 2.1.2
{ | ||
"name": "test-machinepack", | ||
"author": "Mike McNeil <@mikermcneil>", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "Raw test runner for machinepacks (also includes a simple stub test driver)", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
@@ -281,6 +281,19 @@ // TODO: pull this into mp-machines | ||
catch (e) { | ||
var err = e; | ||
var actualOutputMsg = '\n\nActual output:\n'+util.inspect(whatActuallyHappened.output, false, null); | ||
if (_.isError(err)) { | ||
err.message += actualOutputMsg; | ||
err.stack += actualOutputMsg; | ||
} | ||
else if (_.isString(err)) { | ||
err += actualOutputMsg; | ||
err = new Error(err); | ||
} | ||
else { | ||
err = new Error('Post-condition test failed- returned error data:\n'+util.inspect(err, false, null)+actualOutputMsg); | ||
} | ||
failureReport.failedPostConditions.push({ | ||
index: i, | ||
label: inputs.postConditions[i].label, | ||
error: e | ||
error: err | ||
}); | ||
@@ -287,0 +300,0 @@ return next(); |
34550
688