mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 17:47:49 +00:00
Ensure callback shorthands work with _.uniq. [\ht @jden, @motowilliams]
Former-commit-id: d9a0e688414edc4167b5f8e9ca123bab587f8264
This commit is contained in:
12
test/test.js
12
test/test.js
@@ -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']]);
|
||||
});
|
||||
});
|
||||
}());
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user