From d657afbac96a3c979140fb6d377ca5bff0a644d9 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 13 Aug 2016 15:04:33 -0600 Subject: [PATCH] show test #, stack, and stringified test --- tests/basic.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/basic.js b/tests/basic.js index f85a779..cd93d70 100644 --- a/tests/basic.js +++ b/tests/basic.js @@ -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();