diff --git a/public/js/lib/coursewares/coursewaresJSFramework_0.0.6.js b/public/js/lib/coursewares/coursewaresJSFramework_0.0.6.js index f88bca61aa9..0710e4ee6e2 100644 --- a/public/js/lib/coursewares/coursewaresJSFramework_0.0.6.js +++ b/public/js/lib/coursewares/coursewaresJSFramework_0.0.6.js @@ -210,7 +210,16 @@ var runTests = function(err, data) { err: "No user tests were run." }]; 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); pushed = true; userTests.forEach(function(chaiTestFromJSON, indexOfTestArray,