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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('-', testName);
|
|
||||||
|
|
||||||
if (testSuite.beforeEach) {
|
if (testSuite.beforeEach) {
|
||||||
testSuite.beforeEach();
|
testSuite.beforeEach();
|
||||||
|
@ -36,6 +35,11 @@ function runTests() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
testSuite[testName]();
|
testSuite[testName]();
|
||||||
|
console.log('+ ' + testName);
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
console.log('- ' + testName);
|
||||||
|
console.warn(e);
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
if (testSuite.afterEach) {
|
if (testSuite.afterEach) {
|
||||||
|
|
Loading…
Reference in New Issue