catch errors thrown from tests and display error information
This commit is contained in:
parent
39b262b279
commit
2384f2cf9b
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue