2015-02-06 16:55:48 -08:00
|
|
|
(function() {
|
|
|
|
var allTestsGood = true;
|
|
|
|
var expect = chai.expect;
|
2015-02-14 14:09:26 -08:00
|
|
|
var tests = parent.tests;
|
2015-02-06 16:55:48 -08:00
|
|
|
|
2015-02-14 14:09:26 -08:00
|
|
|
for (var i = 0; i < tests.length; i++) {
|
|
|
|
|
|
|
|
try {
|
|
|
|
eval(tests[i]);
|
|
|
|
} catch (err) {
|
|
|
|
allTestsGood = false;
|
2015-02-14 17:28:07 -05:00
|
|
|
console.log('All tests are good?', allTestsGood);
|
|
|
|
parent.postError(err);
|
|
|
|
|
2015-02-14 14:09:26 -08:00
|
|
|
} finally {
|
|
|
|
if (allTestsGood) {
|
2015-02-14 17:28:07 -05:00
|
|
|
console.log('You should not be able to see me if there are errors on teh screen!', allTestsGood);
|
|
|
|
parent.postSuccess();
|
2015-02-14 14:09:26 -08:00
|
|
|
}
|
2015-02-06 16:55:48 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
})();
|