From b56d7ab9c353b282155cd29d6ba483f3e0ed361f Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 15 Jul 2014 08:51:55 -0700 Subject: [PATCH] Cleanup test titles for "_.pluck" and "_.where" style callbacks. --- test/test.js | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/test/test.js b/test/test.js index 833abe561..c1fceada0 100644 --- a/test/test.js +++ b/test/test.js @@ -1867,7 +1867,7 @@ deepEqual(actual.hasOwnProperty, 2); }); - test('should work with a string for `callback`', 1, function() { + test('should work with a "_.pluck" style `callback`', 1, function() { var actual = _.countBy(['one', 'two', 'three'], 'length'); deepEqual(actual, { '3': 2, '5': 1 }); }); @@ -2925,7 +2925,7 @@ deepEqual(_.dropRightWhile(objects, { 'b': 2 }), objects.slice(0, 2)); }); - test('should work with a string for `predicate`', 1, function() { + test('should work with a "_.pluck" style `predicate`', 1, function() { deepEqual(_.dropRightWhile(objects, 'b'), objects.slice(0, 1)); }); @@ -2987,7 +2987,7 @@ deepEqual(_.dropWhile(objects, { 'b': 2 }), objects.slice(1)); }); - test('should work with a string for `predicate`', 1, function() { + test('should work with a "_.pluck" style `predicate`', 1, function() { deepEqual(_.dropWhile(objects, 'b'), objects.slice(2)); }); @@ -3274,7 +3274,7 @@ strictEqual(func(objects, { 'b': 2 }), expected[2]); }); - test('should work with a string for `predicate`', 1, function() { + test('should work with a "_.pluck" style `predicate`', 1, function() { strictEqual(func(objects, 'b'), expected[3]); }); @@ -3546,12 +3546,12 @@ deepEqual(actual, [2, 3]); }); - test('should work with an object for `predicate`', 1, function() { - deepEqual(_.takeRightWhile(objects, { 'b': 2 }), objects.slice(2)); + test('should work with a "_.pluck" style `predicate`', 1, function() { + deepEqual(_.takeRightWhile(objects, 'b'), objects.slice(1)); }); - test('should work with a string for `predicate`', 1, function() { - deepEqual(_.takeRightWhile(objects, 'b'), objects.slice(1)); + test('should work with a "_.where" style `predicate`', 1, function() { + deepEqual(_.takeRightWhile(objects, { 'b': 2 }), objects.slice(2)); }); test('should return a wrapped value when chaining', 2, function() { @@ -3608,12 +3608,12 @@ deepEqual(actual, [1, 2]); }); - test('should work with an object for `predicate`', 1, function() { - deepEqual(_.takeWhile(objects, { 'b': 2 }), objects.slice(0, 1)); + test('should work with a "_.pluck" style `predicate`', 1, function() { + deepEqual(_.takeWhile(objects, 'b'), objects.slice(0, 2)); }); - test('should work with a string for `predicate`', 1, function() { - deepEqual(_.takeWhile(objects, 'b'), objects.slice(0, 2)); + test('should work with a "_.where" style `predicate`', 1, function() { + deepEqual(_.takeWhile(objects, { 'b': 2 }), objects.slice(0, 1)); }); test('should return a wrapped value when chaining', 2, function() { @@ -4330,7 +4330,7 @@ deepEqual(_.groupBy(array, 1), { 'a': [[1 , 'a'], [2, 'a']], 'b': [[2, 'b']] }); }); - test('should work with a string for `callback`', 1, function() { + test('should work with a "_.pluck" style `callback`', 1, function() { var actual = _.groupBy(['one', 'two', 'three'], 'length'); deepEqual(actual, { '3': ['one', 'two'], '5': ['three'] }); }); @@ -8054,7 +8054,7 @@ deepEqual(_.partition(array, 1), [[array[1]], [array[0], array[2]]]); }); - test('should work with a string for `callback`', 1, function() { + test('should work with a "_.pluck" style `callback`', 1, function() { var objects = [{ 'a': 1 }, { 'a': 1 }, { 'b': 2 }], actual = _.partition(objects, 'a'); @@ -9299,7 +9299,7 @@ deepEqual(actual, [3, 1, 2]); }); - test('should work with a string for `callback`', 1, function() { + test('should work with a "_.pluck" style `callback`', 1, function() { var actual = _.pluck(_.sortBy(objects, 'b'), 'b'); deepEqual(actual, [1, 2, 3, 4]); }); @@ -9424,7 +9424,7 @@ strictEqual(actual, 1); }); - test('`_.' + methodName + '` should work with a string for `callback`', 1, function() { + test('`_.' + methodName + '` should work with a "_.pluck" style `callback`', 1, function() { var actual = func(objects, { 'x': 40 }, 'x'); strictEqual(actual, 1); });