pull/1485/head
benmcmahon100 2015-08-03 17:12:48 +01:00
parent c9c2a74461
commit 2f5b7a7db2
1 changed files with 10 additions and 1 deletions

View File

@ -210,7 +210,16 @@ var runTests = function(err, data) {
err: "No user tests were run." err: "No user tests were run."
}]; }];
createTestDisplay(); createTestDisplay();
} else if (userTests) { }
else if(editorValue.match(/if\s\(null\)\sconsole\.log\(1\);/gi)){
allTestsPassed = false;
userTests = [{
text: "Program Execution Failure",
err: "Invalid if (null) console.log(1); detected"
}];
createTestDisplay();
}
else if (userTests) {
userTests.push(false); userTests.push(false);
pushed = true; pushed = true;
userTests.forEach(function(chaiTestFromJSON, indexOfTestArray, userTests.forEach(function(chaiTestFromJSON, indexOfTestArray,