Cleanup _.random unit test.

Former-commit-id: adc32aa17c4375446f180cf6f9daff2eb13b841e
This commit is contained in:
John-David Dalton
2013-06-12 08:00:33 -07:00
parent 9bd12eb782
commit 178d9fb8d5

View File

@@ -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);