diff --git a/test/helpers/spin.js b/test/helpers/spin.js index 5f4d56f05..46484e410 100644 --- a/test/helpers/spin.js +++ b/test/helpers/spin.js @@ -12,11 +12,11 @@ exports.spinWait = function (spinFn, waitMs, intMs) { var begunAt = Date.now(); var endAt = begunAt + waitMs; var spin = function () { - return spinFn().catch(function () { + return spinFn().catch(function (err) { if (Date.now() < endAt) { return Q.delay(intMs).then(spin); } else { - throw new Error("spinWait condition unfulfilled."); + throw new Error("spinWait condition unfulfilled. Promise rejected with error:", err); } }); };