Files
freeCodeCamp/public/js/lib/coursewares/iFrameScripts_0.0.2.js

20 lines
564 B
JavaScript
Raw Normal View History

(function() {
var expect = chai.expect;
var tests = parent.tests;
for (var i = 0; i < tests.length; i++) {
2015-02-14 18:31:32 -05:00
var thisTest = true;
try {
2015-02-14 18:31:32 -05:00
eval(parent.tests[i]);
} catch (err) {
allTestsGood = false;
2015-02-14 18:31:32 -05:00
thisTest = false;
parent.postError(JSON.stringify(err.message.split(':').shift()));
} finally {
2015-02-14 18:31:32 -05:00
if (thisTest) {
parent.postSuccess(JSON.stringify(tests[i].split(',').pop().replace(/\'/g, '').replace(/\)/, '')));
}
}
}
2015-05-10 21:59:55 -07:00
})();