mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 10:07:48 +00:00
Test order nits.
This commit is contained in:
24
test/test.js
24
test/test.js
@@ -3314,14 +3314,14 @@
|
|||||||
deepEqual(actual, [1]);
|
deepEqual(actual, [1]);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should work with an object for `predicate`', 1, function() {
|
|
||||||
deepEqual(_.dropRightWhile(objects, { 'b': 2 }), objects.slice(0, 2));
|
|
||||||
});
|
|
||||||
|
|
||||||
test('should work with a "_.pluck" style `predicate`', 1, function() {
|
test('should work with a "_.pluck" style `predicate`', 1, function() {
|
||||||
deepEqual(_.dropRightWhile(objects, 'b'), objects.slice(0, 1));
|
deepEqual(_.dropRightWhile(objects, 'b'), objects.slice(0, 1));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('should work with a "_.where" style `predicate`', 1, function() {
|
||||||
|
deepEqual(_.dropRightWhile(objects, { 'b': 2 }), objects.slice(0, 2));
|
||||||
|
});
|
||||||
|
|
||||||
test('should return a wrapped value when chaining', 2, function() {
|
test('should return a wrapped value when chaining', 2, function() {
|
||||||
if (!isNpm) {
|
if (!isNpm) {
|
||||||
var wrapped = _(array).dropRightWhile(function(num) {
|
var wrapped = _(array).dropRightWhile(function(num) {
|
||||||
@@ -3376,14 +3376,14 @@
|
|||||||
deepEqual(actual, [3]);
|
deepEqual(actual, [3]);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should work with an object for `predicate`', 1, function() {
|
|
||||||
deepEqual(_.dropWhile(objects, { 'b': 2 }), objects.slice(1));
|
|
||||||
});
|
|
||||||
|
|
||||||
test('should work with a "_.pluck" style `predicate`', 1, function() {
|
test('should work with a "_.pluck" style `predicate`', 1, function() {
|
||||||
deepEqual(_.dropWhile(objects, 'b'), objects.slice(2));
|
deepEqual(_.dropWhile(objects, 'b'), objects.slice(2));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('should work with a "_.where" style `predicate`', 1, function() {
|
||||||
|
deepEqual(_.dropWhile(objects, { 'b': 2 }), objects.slice(1));
|
||||||
|
});
|
||||||
|
|
||||||
test('should return a wrapped value when chaining', 2, function() {
|
test('should return a wrapped value when chaining', 2, function() {
|
||||||
if (!isNpm) {
|
if (!isNpm) {
|
||||||
var wrapped = _(array).dropWhile(function(num) {
|
var wrapped = _(array).dropWhile(function(num) {
|
||||||
@@ -3641,14 +3641,14 @@
|
|||||||
strictEqual(func(objects, function(object) { return object.a === 3; }), expected[1]);
|
strictEqual(func(objects, function(object) { return object.a === 3; }), expected[1]);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should work with an object for `predicate`', 1, function() {
|
|
||||||
strictEqual(func(objects, { 'b': 2 }), expected[2]);
|
|
||||||
});
|
|
||||||
|
|
||||||
test('should work with a "_.pluck" style `predicate`', 1, function() {
|
test('should work with a "_.pluck" style `predicate`', 1, function() {
|
||||||
strictEqual(func(objects, 'b'), expected[3]);
|
strictEqual(func(objects, 'b'), expected[3]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('should work with a "_.where" style `predicate`', 1, function() {
|
||||||
|
strictEqual(func(objects, { 'b': 2 }), expected[2]);
|
||||||
|
});
|
||||||
|
|
||||||
test('should return `' + expected[1] + '` for empty or falsey collections', 1, function() {
|
test('should return `' + expected[1] + '` for empty or falsey collections', 1, function() {
|
||||||
var actual = [],
|
var actual = [],
|
||||||
emptyValues = /Index/.test(methodName) ? _.reject(empties, _.isPlainObject) : empties,
|
emptyValues = /Index/.test(methodName) ? _.reject(empties, _.isPlainObject) : empties,
|
||||||
|
|||||||
Reference in New Issue
Block a user