From 178d9fb8d544dd0a543ee0bba105b40b48e918f9 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Wed, 12 Jun 2013 08:00:33 -0700 Subject: [PATCH] Cleanup `_.random` unit test. Former-commit-id: adc32aa17c4375446f180cf6f9daff2eb13b841e --- test/test.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test.js b/test/test.js index b34d82c7d..122b2034c 100644 --- a/test/test.js +++ b/test/test.js @@ -2427,9 +2427,10 @@ test('supports not passing a `max` argument', function() { var actual = _.random(5), + limit = 50, start = new Date; - while ((new Date - start) < 50 && actual == 5) { + while ((new Date - start) < limit && actual == 5) { actual = _.random(5); } notEqual(actual, 5);