show test #, stack, and stringified test

This commit is contained in:
AJ ONeal 2016-08-13 15:04:33 -06:00
parent 43c830482c
commit d657afbac9
1 changed files with 11 additions and 1 deletions

View File

@ -329,6 +329,8 @@ var tests = [
}
];
var arr = tests.slice(0);
function run() {
var test = tests.shift();
if (!test) {
@ -336,7 +338,15 @@ function run() {
return;
}
test().then(run);
test().then(run, function (err) {
var index = arr.length - tests.length - 1;
console.error('');
console.error(arr[index].toString());
console.error('');
console.error(err.stack);
console.error('');
console.error('Failed Test #' + index);
});
}
run();