mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 10:57:49 +00:00
Merge pull request #198 from shinuza/underscore.groupBytest
groupBy tests may fail in some cases.
This commit is contained in:
@@ -188,9 +188,9 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
test('collections: groupBy', function() {
|
test('collections: groupBy', function() {
|
||||||
var parity = _.groupBy([1, 2, 3, 4, 5, 6], function(num){ return num % 2; });
|
var parity = _.groupBy([1, 2, 3, 4, 5, 6], function(num){ return num % 2; });
|
||||||
equals(_.keys(parity).join(', '), '0, 1', 'created a group for each value');
|
ok('0' in parity && '1' in parity, 'created a group for each value');
|
||||||
equals(parity[0].join(', '), '2, 4, 6', 'put each even number in the right group');
|
equals(parity[0].join(', '), '2, 4, 6', 'put each even number in the right group');
|
||||||
})
|
});
|
||||||
|
|
||||||
test('collections: sortedIndex', function() {
|
test('collections: sortedIndex', function() {
|
||||||
var numbers = [10, 20, 30, 40, 50], num = 35;
|
var numbers = [10, 20, 30, 40, 50], num = 35;
|
||||||
|
|||||||
Reference in New Issue
Block a user