mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 02:17:48 +00:00
Avoid test fails for npm builds.
This commit is contained in:
34
test/test.js
34
test/test.js
@@ -4088,13 +4088,18 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('should work in a lazy chain sequence with `drop`', 1, function() {
|
test('should work in a lazy chain sequence with `drop`', 1, function() {
|
||||||
var actual = _(array)
|
if (!isNpm) {
|
||||||
.dropWhile(function(num) { return num == 1; })
|
var actual = _(array)
|
||||||
.drop()
|
.dropWhile(function(num) { return num == 1; })
|
||||||
.dropWhile(function(num) { return num == 3; })
|
.drop()
|
||||||
.value();
|
.dropWhile(function(num) { return num == 3; })
|
||||||
|
.value();
|
||||||
|
|
||||||
deepEqual(actual, [4]);
|
deepEqual(actual, [4]);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
skipTest();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should provide the correct `predicate` arguments in a lazy chain sequence', 4, function() {
|
test('should provide the correct `predicate` arguments in a lazy chain sequence', 4, function() {
|
||||||
@@ -5032,13 +5037,18 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('should work in a lazy chain sequence with `take`', 1, function() {
|
test('should work in a lazy chain sequence with `take`', 1, function() {
|
||||||
var actual = _(array)
|
if (!isNpm) {
|
||||||
.takeWhile(function(num) { return num < 4; })
|
var actual = _(array)
|
||||||
.take(2)
|
.takeWhile(function(num) { return num < 4; })
|
||||||
.takeWhile(function(num) { return num == 1; })
|
.take(2)
|
||||||
.value();
|
.takeWhile(function(num) { return num == 1; })
|
||||||
|
.value();
|
||||||
|
|
||||||
deepEqual(actual, [1]);
|
deepEqual(actual, [1]);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
skipTest();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should provide the correct `predicate` arguments in a lazy chain sequence', 4, function() {
|
test('should provide the correct `predicate` arguments in a lazy chain sequence', 4, function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user