catch errors thrown from tests and display error information

This commit is contained in:
Ari Lazier 2015-10-14 15:15:44 -07:00
parent 39b262b279
commit 2384f2cf9b
1 changed files with 5 additions and 1 deletions

View File

@ -28,7 +28,6 @@ function runTests() {
continue;
}
console.log('-', testName);
if (testSuite.beforeEach) {
testSuite.beforeEach();
@ -36,6 +35,11 @@ function runTests() {
try {
testSuite[testName]();
console.log('+ ' + testName);
}
catch (e) {
console.log('- ' + testName);
console.warn(e);
}
finally {
if (testSuite.afterEach) {