mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +00:00
Add test to ensure _.flatten returns empty arrays for non array-like objects.
This commit is contained in:
@@ -2625,6 +2625,11 @@
|
||||
|
||||
deepEqual(_.flatten(array, true), expected);
|
||||
});
|
||||
|
||||
test('should return an empty array for non array-like objects', 1, function() {
|
||||
var actual = _.flatten({ 'a': 1 }, _.identity);
|
||||
deepEqual(actual, []);
|
||||
});
|
||||
}(1, 2, 3));
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user