mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 08:57:49 +00:00
Make _.random return 0 or 1 when no arguments are passed.
Former-commit-id: 7d20f5240d534f0091757f613c664b08e0d45759
This commit is contained in:
@@ -1163,9 +1163,9 @@
|
||||
QUnit.module('lodash.random');
|
||||
|
||||
(function() {
|
||||
test('should work like `Math.random` if no arguments are passed', function() {
|
||||
test('should return `0` or `1` when no arguments are passed', function() {
|
||||
var actual = _.random();
|
||||
ok(actual >= 0 && actual < 1);
|
||||
ok(actual === 0 || actual === 1);
|
||||
});
|
||||
|
||||
test('supports not passing a `max` argument', function() {
|
||||
|
||||
Reference in New Issue
Block a user