Fix uncaught exceptions when testing

This commit is contained in:
Berkeley Martinez
2015-11-01 21:18:00 -08:00
parent 28790899af
commit 266d653bf2

View File

@ -72,7 +72,11 @@ function createTest({ title, tests = [], solutions = [] }) {
/* eslint-enable no-unused-vars */
solutions.forEach(solution => {
tests.forEach(test => {
eval(solution + ';;' + test);
try {
eval(solution + ';;' + test);
} catch (e) {
t.fail(e);
}
});
});
})