Merge pull request #2 from n8225/testpr

move exit out of loop
This commit is contained in:
n8225 2016-10-24 19:45:40 -07:00 committed by GitHub
commit 8bd8bdb05e

View File

@ -27,22 +27,19 @@ function entryErrorCheck(md) {
if (entryArray[i].pass == true) { if (entryArray[i].pass == true) {
totalPass += 1; totalPass += 1;
//console.log(i + 1 + ". Pass: " + entryArray[i].name); //console.log(i + 1 + ". Pass: " + entryArray[i].name);
process.exit(0);
} else { } else {
console.log("Line #" + i + 1 + ". Fail: " + entryArray[i].name); console.log("Line #" + i + 1 + ". Fail: " + entryArray[i].name);
//console.log(entries[i]); //console.log(entries[i]);
totalFail += 1; totalFail += 1;
process.exit(1);
} }
} }
} }
if (totalFail > 0) { if (totalFail > 0) {
console.log(totalFail + " Failed, " + totalPass + " Passed, of " + total); console.log(totalFail + " Failed, " + totalPass + " Passed, of " + total);
process.exit(1);
testStatus = 1;
} else { } else {
console.log(totalFail + " Failed, " + totalPass + " Passed, of " + total); console.log(totalFail + " Failed, " + totalPass + " Passed, of " + total);
testStatus = 0; process.exit(0);
} }
//console.log(entries[i]) //console.log(entries[i])
//console.log(totalPass + "|" + totalFail); //console.log(totalPass + "|" + totalFail);