From e08599d9bb9ad7bd9495cb717800adc7759036b9 Mon Sep 17 00:00:00 2001 From: David House Date: Fri, 10 Jan 2020 14:14:28 -0500 Subject: [PATCH] :sparkles: Allow for returning non zero exit code if failing tests --- bin/junit-to-md.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/junit-to-md.js b/bin/junit-to-md.js index 4918b36..9581038 100755 --- a/bin/junit-to-md.js +++ b/bin/junit-to-md.js @@ -34,8 +34,13 @@ glob("**/TEST*.xml", async function(err, files) { if (output === "text") { outputText(); - } else { + } else if (output === "summary") { outputSummary(); + } else { + if (failedTests > 0) { + console.log("Failing tests detected, so returning a non-zero exit code"); + process.exit(1); + } } });