mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 10:17:48 +00:00
Cleanup _.random unit test.
Former-commit-id: adc32aa17c4375446f180cf6f9daff2eb13b841e
This commit is contained in:
@@ -2427,9 +2427,10 @@
|
|||||||
|
|
||||||
test('supports not passing a `max` argument', function() {
|
test('supports not passing a `max` argument', function() {
|
||||||
var actual = _.random(5),
|
var actual = _.random(5),
|
||||||
|
limit = 50,
|
||||||
start = new Date;
|
start = new Date;
|
||||||
|
|
||||||
while ((new Date - start) < 50 && actual == 5) {
|
while ((new Date - start) < limit && actual == 5) {
|
||||||
actual = _.random(5);
|
actual = _.random(5);
|
||||||
}
|
}
|
||||||
notEqual(actual, 5);
|
notEqual(actual, 5);
|
||||||
|
|||||||
Reference in New Issue
Block a user