From ffca1682cac4eb344b71b8e54560f40b8f3a85f7 Mon Sep 17 00:00:00 2001 From: nrew225 Date: Mon, 24 Oct 2016 19:43:49 -0700 Subject: [PATCH] move exit out of loop --- test.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/test.js b/test.js index 1a83fed1..03eeb954 100644 --- a/test.js +++ b/test.js @@ -27,22 +27,19 @@ function entryErrorCheck(md) { if (entryArray[i].pass == true) { totalPass += 1; //console.log(i + 1 + ". Pass: " + entryArray[i].name); - process.exit(0); } else { console.log("Line #" + i + 1 + ". Fail: " + entryArray[i].name); //console.log(entries[i]); totalFail += 1; - process.exit(1); } } } if (totalFail > 0) { console.log(totalFail + " Failed, " + totalPass + " Passed, of " + total); - - testStatus = 1; + process.exit(1); } else { console.log(totalFail + " Failed, " + totalPass + " Passed, of " + total); - testStatus = 0; + process.exit(0); } //console.log(entries[i]) //console.log(totalPass + "|" + totalFail);