From 8a3618e3667f0ffd145b8a65641b5696f7ccd8b6 Mon Sep 17 00:00:00 2001 From: Nathan Leniz Date: Thu, 22 Jan 2015 16:15:43 -0500 Subject: [PATCH] No longer overwriting user entrypoint with predefined test entry point --- public/js/lib/bonfire/bonfireFramework.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/public/js/lib/bonfire/bonfireFramework.js b/public/js/lib/bonfire/bonfireFramework.js index ebbfa13d76..4f9a44423c 100644 --- a/public/js/lib/bonfire/bonfireFramework.js +++ b/public/js/lib/bonfire/bonfireFramework.js @@ -102,12 +102,15 @@ var testSalt = Math.random(); var scrapeTests = function(userJavaScript) { - console.log(challengeEntryPointNegate); + var checkIfUserSuppliedEntry = new RegExp(challengeEntryPointNegate, 'g'); - console.log(checkIfUserSuppliedEntry); - console.log(checkIfUserSuppliedEntry.test(userJavaScript)); - if (!(checkIfUserSuppliedEntry.test(userJavaScript))) { + + var userEntryCheck = checkIfUserSuppliedEntry.test(userJavaScript); + if (!userEntryCheck) { + userJavaScript += '\n' + challengeEntryPoint; + } else { + // do nothing? } for (var i = 0; i < publicTests.length; i++) { userJavaScript += '\n' + publicTests[i];