Whitespace nits in test/test.js. [ci skip]

This commit is contained in:
John-David Dalton
2014-04-16 08:33:16 -07:00
parent d3f2cd5321
commit f0817b2461

View File

@@ -498,6 +498,7 @@
function message(methodName) { function message(methodName) {
return '`_.' + methodName + '` should avoid overwritten native methods'; return '`_.' + methodName + '` should avoid overwritten native methods';
} }
var object = { 'a': 1 }, var object = { 'a': 1 },
otherObject = { 'b': 2 }, otherObject = { 'b': 2 },
largeArray = _.times(largeArraySize, _.constant(object)); largeArray = _.times(largeArraySize, _.constant(object));
@@ -830,6 +831,7 @@
function Foo() { function Foo() {
return this; return this;
} }
var bound = _.bind(Foo, { 'a': 1 }), var bound = _.bind(Foo, { 'a': 1 }),
newBound = new bound; newBound = new bound;
@@ -842,6 +844,7 @@
function Foo(value) { function Foo(value) {
return value && object; return value && object;
} }
var bound = _.bind(Foo), var bound = _.bind(Foo),
object = {}; object = {};
@@ -1719,6 +1722,7 @@
push.apply(result, arguments); push.apply(result, arguments);
return result; return result;
} }
var expected = [1, 2, 3], var expected = [1, 2, 3],
object = { 'a': 1 }, object = { 'a': 1 },
callback = _.callback(_.partial(fn, 2), object); callback = _.callback(_.partial(fn, 2), object);
@@ -1859,6 +1863,7 @@
function Foo(value) { function Foo(value) {
return value && object; return value && object;
} }
var curried = _.curry(Foo), var curried = _.curry(Foo),
object = {}; object = {};
@@ -1871,6 +1876,7 @@
var value = this || {}; var value = this || {};
return [value[a], value[b], value[c]]; return [value[a], value[b], value[c]];
} }
var object = { 'a': 1, 'b': 2, 'c': 3 }, var object = { 'a': 1, 'b': 2, 'c': 3 },
expected = [1, 2, 3]; expected = [1, 2, 3];
@@ -2299,6 +2305,8 @@
QUnit.module('lodash.difference'); QUnit.module('lodash.difference');
(function() { (function() {
var args = arguments;
test('should return the difference of the given arrays', 2, function() { test('should return the difference of the given arrays', 2, function() {
var actual = _.difference([1, 2, 3, 4, 5], [5, 2, 10]); var actual = _.difference([1, 2, 3, 4, 5], [5, 2, 10]);
deepEqual(actual, [1, 3, 4]); deepEqual(actual, [1, 3, 4]);
@@ -3714,6 +3722,7 @@
} }
return -1; return -1;
} }
var array = [1, new Foo, 3, new Foo], var array = [1, new Foo, 3, new Foo],
indexOf = _.indexOf; indexOf = _.indexOf;
@@ -5687,6 +5696,7 @@
function callback(num, index) { function callback(num, index) {
return this[index] + num; return this[index] + num;
} }
var actual = _.map([1], callback, [2]); var actual = _.map([1], callback, [2]);
deepEqual(actual, [3]); deepEqual(actual, [3]);
@@ -5781,6 +5791,7 @@
function callback(num, key) { function callback(num, key) {
return this[key] + num; return this[key] + num;
} }
var actual = _.mapValues({ 'a': 1 }, callback, { 'a': 2 }); var actual = _.mapValues({ 'a': 1 }, callback, { 'a': 2 });
deepEqual(actual, { 'a': 3 }); deepEqual(actual, { 'a': 3 });
@@ -6753,6 +6764,7 @@
function Foo(value) { function Foo(value) {
return value && object; return value && object;
} }
var object = {}, var object = {},
par = func(Foo); par = func(Foo);
@@ -6807,6 +6819,7 @@
function fn() { function fn() {
return slice.call(arguments); return slice.call(arguments);
} }
var a = _.partial(fn), var a = _.partial(fn),
b = _.partialRight(a, 3), b = _.partialRight(a, 3),
c = _.partial(b, 1); c = _.partial(b, 1);
@@ -6820,6 +6833,7 @@
push.apply(result, arguments); push.apply(result, arguments);
return result; return result;
} }
var expected = [1, 2, 3, 4], var expected = [1, 2, 3, 4],
object = { 'a': 1, 'fn': fn }; object = { 'a': 1, 'fn': fn };
@@ -6846,6 +6860,7 @@
function fn() { function fn() {
return this.a; return this.a;
} }
var a = _.bind(fn, { 'a': 1 }), var a = _.bind(fn, { 'a': 1 }),
b = _.bind(a, { 'a': 2 }), b = _.bind(a, { 'a': 2 }),
c = _.bind(b, { 'a': 3 }); c = _.bind(b, { 'a': 3 });
@@ -9266,6 +9281,7 @@
this.b = 2; this.b = 2;
this.c = 3; this.c = 3;
} }
var actual = _.transform(new Foo, function(result, value, key) { var actual = _.transform(new Foo, function(result, value, key) {
result[key] = value * value; result[key] = value * value;
}); });
@@ -9729,6 +9745,8 @@
QUnit.module('lodash.xor'); QUnit.module('lodash.xor');
(function() { (function() {
var args = arguments;
test('should return the symmetric difference of the given arrays', 1, function() { test('should return the symmetric difference of the given arrays', 1, function() {
var actual = _.xor([1, 2, 5], [2, 3, 5], [3, 4, 5]); var actual = _.xor([1, 2, 5], [2, 3, 5], [3, 4, 5]);
deepEqual(actual, [1, 4, 5]); deepEqual(actual, [1, 4, 5]);