From 8bddb47fab430d89c5bf470a0bbb57ce15932a5b Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 27 Jul 2014 15:49:00 -0700 Subject: [PATCH] Add test for `_.slice` where `start` >= `end`. --- test/test.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/test.js b/test/test.js index b436753a6..76a066b97 100644 --- a/test/test.js +++ b/test/test.js @@ -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]); });