mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +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() {
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user