diff --git a/test/test.js b/test/test.js index 6843ce6e9..1edefc271 100644 --- a/test/test.js +++ b/test/test.js @@ -4087,6 +4087,16 @@ } }); + test('should work in a lazy chain sequence with `drop`', 1, function() { + var actual = _(array) + .dropWhile(function(num) { return num == 1; }) + .drop() + .dropWhile(function(num) { return num == 3; }) + .value(); + + deepEqual(actual, [4]); + }); + test('should provide the correct `predicate` arguments in a lazy chain sequence', 4, function() { if (!isNpm) { var args, @@ -5021,6 +5031,16 @@ } }); + test('should work in a lazy chain sequence with `take`', 1, function() { + var actual = _(array) + .takeWhile(function(num) { return num < 4; }) + .take(2) + .takeWhile(function(num) { return num == 1; }) + .value(); + + deepEqual(actual, [1]); + }); + test('should provide the correct `predicate` arguments in a lazy chain sequence', 4, function() { if (!isNpm) { var args,