diff options
author | Ed Eustace <ed.eustace@gmail.com> | 2015-06-17 14:09:00 +0100 |
---|---|---|
committer | Ed Eustace <ed.eustace@gmail.com> | 2015-06-17 14:09:00 +0100 |
commit | 33b06ac7418eafed4c15c7202a7c93a65325dd31 (patch) | |
tree | a1b729a84121c6aa256c45950e91359c98edd23d | |
parent | dac52c832159179967cc4252dd2bd7db37d65682 (diff) | |
download | async-33b06ac7418eafed4c15c7202a7c93a65325dd31.tar.gz |
add durations to failure message
-rwxr-xr-x | test/test-async.js | 3 |
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(); }); }; |