Ensure callback shorthands work with _.uniq. [\ht @jden, @motowilliams]

Former-commit-id: d9a0e688414edc4167b5f8e9ca123bab587f8264
This commit is contained in:
John-David Dalton
2013-03-03 14:06:51 -08:00
parent 2d40dfd8d4
commit 9961ddc2a8
9 changed files with 123 additions and 110 deletions

View File

@@ -2610,6 +2610,18 @@
deepEqual(actual, expected);
});
_.each({
'an object': ['a'],
'a number': 0,
'a string': '0'
},
function(callback, key) {
test('should work with ' + key + ' for `callback`', function() {
var actual = _.uniq([['a'], ['b'], ['a']], callback);
deepEqual(actual, [['a'], ['b']]);
});
});
}());
/*--------------------------------------------------------------------------*/