mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-11 04:01:15 -04:00
Fix uncaught exceptions when testing
This commit is contained in:
@@ -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);
|
||||
}
|
||||
});
|
||||
});
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user