mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +00:00
Add test for _.slice where start >= end.
This commit is contained in:
@@ -9358,6 +9358,12 @@
|
||||
});
|
||||
});
|
||||
|
||||
test('should work with `start` >= `end`', 2, function() {
|
||||
_.each([2, 3], function(start) {
|
||||
deepEqual(_.slice(array, start, 2), []);
|
||||
});
|
||||
});
|
||||
|
||||
test('should work with a positive `end`', 1, function() {
|
||||
deepEqual(_.slice(array, 0, 1), [1]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user