summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Eustace <ed.eustace@gmail.com>2015-06-17 14:09:00 +0100
committerEd Eustace <ed.eustace@gmail.com>2015-06-17 14:09:00 +0100
commit33b06ac7418eafed4c15c7202a7c93a65325dd31 (patch)
treea1b729a84121c6aa256c45950e91359c98edd23d
parentdac52c832159179967cc4252dd2bd7db37d65682 (diff)
downloadasync-33b06ac7418eafed4c15c7202a7c93a65325dd31.tar.gz
add durations to failure message
-rwxr-xr-xtest/test-async.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/test-async.js b/test/test-async.js
index 5b6f803..8b2f87f 100755
--- a/test/test-async.js
+++ b/test/test-async.js
@@ -784,7 +784,8 @@ exports['retry as an embedded task with interval'] = function(test) {
})
}, function(){
var duration = new Date().getTime() - start;
- test.ok(duration > ((opts.times -1) * opts.interval), "The duration should have been greater than ((times -1) * interval)");
+ var expectedMinimumDuration = (opts.times -1) * opts.interval;
+ test.ok(duration >= expectedMinimumDuration, "The duration should have been greater than " + expectedMinimumDuration + ", but was " + duration);
test.done();
});
};