Lines Matching defs:methodName

1354   lodashStable.each(['assign', 'assignIn'], function(methodName) {
1355 var func = _[methodName];
1357 QUnit.test('`_.' + methodName + '` should assign source properties to `object`', function(assert) {
1363 QUnit.test('`_.' + methodName + '` should accept multiple sources', function(assert) {
1371 QUnit.test('`_.' + methodName + '` should overwrite destination properties', function(assert) {
1378 QUnit.test('`_.' + methodName + '` should assign source properties with nullish values', function(assert) {
1385 QUnit.test('`_.' + methodName + '` should skip assignments if values are the same', function(assert) {
1428 QUnit.test('`_.' + methodName + '` should treat sparse array sources as dense', function(assert) {
1437 QUnit.test('`_.' + methodName + '` should assign values of prototype objects', function(assert) {
1446 QUnit.test('`_.' + methodName + '` should coerce string sources to objects', function(assert) {
1469 lodashStable.each(['assignWith', 'assignInWith'], function(methodName) {
1470 var func = _[methodName];
1472 QUnit.test('`_.' + methodName + '` should work with a `customizer` callback', function(assert) {
1482 QUnit.test('`_.' + methodName + '` should work with a `customizer` that returns `undefined`', function(assert) {
2219 var methodName = caseName + 'Case',
2220 func = _[methodName];
2238 QUnit.test('`_.' + methodName + '` should convert `string` to ' + caseName + ' case', function(assert) {
2249 QUnit.test('`_.' + methodName + '` should handle double-converting strings', function(assert) {
2260 QUnit.test('`_.' + methodName + '` should deburr letters', function(assert) {
2278 QUnit.test('`_.' + methodName + '` should remove contraction apostrophes', function(assert) {
2303 QUnit.test('`_.' + methodName + '` should remove Latin mathematical operators', function(assert) {
2310 QUnit.test('`_.' + methodName + '` should coerce `string` to a string', function(assert) {
2318 QUnit.test('`_.' + methodName + '` should return an unwrapped value implicitly when chaining', function(assert) {
2322 assert.strictEqual(_('foo bar')[methodName](), converted);
2329 QUnit.test('`_.' + methodName + '` should return a wrapped value when explicitly chaining', function(assert) {
2333 assert.ok(_('foo bar').chain()[methodName]() instanceof _);
2789 lodashStable.each(['clone', 'cloneDeep'], function(methodName) {
2790 var func = _[methodName],
2791 isDeep = methodName == 'cloneDeep';
2794 QUnit.test('`_.' + methodName + '` should clone ' + kind, function(assert) {
2808 QUnit.test('`_.' + methodName + '` should clone array buffers', function(assert) {
2821 QUnit.test('`_.' + methodName + '` should clone buffers', function(assert) {
2840 QUnit.test('`_.' + methodName + '` should clone `index` and `input` array properties', function(assert) {
2850 QUnit.test('`_.' + methodName + '` should clone `lastIndex` regexp property', function(assert) {
2859 QUnit.test('`_.' + methodName + '` should clone expando properties', function(assert) {
2877 QUnit.test('`_.' + methodName + '` should clone prototype objects', function(assert) {
2886 QUnit.test('`_.' + methodName + '` should set the `[[Prototype]]` of a clone', function(assert) {
2892 QUnit.test('`_.' + methodName + '` should set the `[[Prototype]]` of a clone even when the `constructor` is incorrect', function(assert) {
2900 QUnit.test('`_.' + methodName + '` should ensure `value` constructor is a function before using its `[[Prototype]]`', function(assert) {
2908 QUnit.test('`_.' + methodName + '` should clone properties that shadow those on `Object.prototype`', function(assert) {
2927 QUnit.test('`_.' + methodName + '` should clone symbol properties', function(assert) {
2968 QUnit.test('`_.' + methodName + '` should clone symbol objects', function(assert) {
2986 QUnit.test('`_.' + methodName + '` should not clone symbol primitives', function(assert) {
2997 QUnit.test('`_.' + methodName + '` should not error on DOM elements', function(assert) {
3014 QUnit.test('`_.' + methodName + '` should create an object from the same realm as `value`', function(assert) {
3040 QUnit.test('`_.' + methodName + '` should perform a ' + (isDeep ? 'deep' : 'shallow') + ' clone when used as an iteratee for methods like `_.map`', function(assert) {
3055 QUnit.test('`_.' + methodName + '` should return a unwrapped value when chaining', function(assert) {
3060 actual = _(object)[methodName]();
3071 QUnit.test('`_.' + methodName + '` should clone ' + type + ' values', function(assert) {
3096 QUnit.test('`_.' + methodName + '` should not clone ' + key, function(assert) {
3115 lodashStable.each(['cloneWith', 'cloneDeepWith'], function(methodName) {
3116 var func = _[methodName],
3117 isDeep = methodName == 'cloneDeepWith';
3119 QUnit.test('`_.' + methodName + '` should provide correct `customizer` arguments', function(assert) {
3135 QUnit.test('`_.' + methodName + '` should handle cloning when `customizer` returns `undefined`', function(assert) {
3143 QUnit.test('`_.' + methodName + '` should work with a `customizer` callback and ' + key, function(assert) {
3409 lodashStable.each(['conforms', 'conformsTo'], function(methodName) {
3410 var isConforms = methodName == 'conforms';
3418 QUnit.test('`_.' + methodName + '` should check if `object` conforms to `source`', function(assert) {
3443 QUnit.test('`_.' + methodName + '` should not match by inherited `source` properties', function(assert) {
3467 QUnit.test('`_.' + methodName + '` should not invoke `source` predicates for missing `object` properties', function(assert) {
3480 QUnit.test('`_.' + methodName + '` should work with a function for `object`', function(assert) {
3497 QUnit.test('`_.' + methodName + '` should work with a function for `source`', function(assert) {
3509 QUnit.test('`_.' + methodName + '` should work with a non-plain `object`', function(assert) {
3524 QUnit.test('`_.' + methodName + '` should return `false` when `object` is nullish', function(assert) {
3543 QUnit.test('`_.' + methodName + '` should return `true` when comparing an empty `source` to a nullish `object`', function(assert) {
3559 QUnit.test('`_.' + methodName + '` should return `true` when comparing an empty `source`', function(assert) {
4133 lodashStable.each(['curry', 'curryRight'], function(methodName) {
4134 var func = _[methodName],
4136 isCurry = methodName == 'curry';
4138 QUnit.test('`_.' + methodName + '` should not error on functions with the same name as lodash methods', function(assert) {
4154 QUnit.test('`_.' + methodName + '` should work for function names that shadow those on `Object.prototype`', function(assert) {
4166 QUnit.test('`_.' + methodName + '` should work as an iteratee for methods like `_.map`', function(assert) {
4896 lodashStable.each(['difference', 'differenceBy', 'differenceWith'], function(methodName) {
4897 var func = _[methodName];
4899 QUnit.test('`_.' + methodName + '` should return the difference of two arrays', function(assert) {
4906 QUnit.test('`_.' + methodName + '` should return the difference of multiple arrays', function(assert) {
4913 QUnit.test('`_.' + methodName + '` should treat `-0` as `0`', function(assert) {
4928 QUnit.test('`_.' + methodName + '` should match `NaN`', function(assert) {
4934 QUnit.test('`_.' + methodName + '` should work with large arrays', function(assert) {
4949 QUnit.test('`_.' + methodName + '` should work with large arrays of `-0` as `0`', function(assert) {
4966 QUnit.test('`_.' + methodName + '` should work with large arrays of `NaN`', function(assert) {
4973 QUnit.test('`_.' + methodName + '` should work with large arrays of objects', function(assert) {
4983 QUnit.test('`_.' + methodName + '` should ignore values that are not array-like', function(assert) {
5664 lodashStable.each(['assign', 'assignIn', 'bindAll', 'defaults', 'defaultsDeep', 'merge'], function(methodName) {
5665 var func = _[methodName],
5666 isBindAll = methodName == 'bindAll';
5668 QUnit.test('`_.' + methodName + '` should ' + (isStrict ? '' : 'not ') + 'throw strict mode errors', function(assert) {
5864 lodashStable.each(['find', 'findIndex', 'findKey', 'findLast', 'findLastIndex', 'findLastKey'], function(methodName) {
5865 QUnit.module('lodash.' + methodName);
5868 func = _[methodName];
5883 })[methodName];
5885 QUnit.test('`_.' + methodName + '` should return the found value', function(assert) {
5891 QUnit.test('`_.' + methodName + '` should return `' + expected[1] + '` if value is not found', function(assert) {
5897 QUnit.test('`_.' + methodName + '` should work with `_.matches` shorthands', function(assert) {
5903 QUnit.test('`_.' + methodName + '` should work with `_.matchesProperty` shorthands', function(assert) {
5909 QUnit.test('`_.' + methodName + '` should work with `_.property` shorthands', function(assert) {
5915 QUnit.test('`_.' + methodName + '` should return `' + expected[1] + '` for empty collections', function(assert) {
5918 var emptyValues = lodashStable.endsWith(methodName, 'Index') ? lodashStable.reject(empties, lodashStable.isPlainObject) : empties,
5930 QUnit.test('`_.' + methodName + '` should return an unwrapped value when implicitly chaining', function(assert) {
5940 })[methodName];
5943 assert.strictEqual(_(array)[methodName](), expected);
5950 QUnit.test('`_.' + methodName + '` should return a wrapped value when explicitly chaining', function(assert) {
5954 assert.ok(_(array).chain()[methodName]() instanceof _);
5961 QUnit.test('`_.' + methodName + '` should not execute immediately when explicitly chaining', function(assert) {
5965 var wrapped = _(array).chain()[methodName]();
5973 QUnit.test('`_.' + methodName + '` should work in a lazy sequence', function(assert) {
5984 assert.strictEqual(wrapped[methodName](), func(lodashStable.filter(array, isEven)));
5993 _.each(['find', 'findIndex', 'findLast', 'findLastIndex'], function(methodName) {
5994 var func = _[methodName];
5996 QUnit.test('`_.' + methodName + '` should provide correct `predicate` arguments for arrays', function(assert) {
6010 _.each(['find', 'findKey', 'findLast', 'findLastKey'], function(methodName) {
6011 var func = _[methodName];
6013 QUnit.test('`_.' + methodName + '` should work with an object for `collection`', function(assert) {
6025 })[methodName];
6030 QUnit.test('`_.' + methodName + '` should provide correct `predicate` arguments for objects', function(assert) {
6048 lodashStable.each(['find', 'findLast'], function(methodName) {
6049 var isFind = methodName == 'find';
6051 QUnit.test('`_.' + methodName + '` should support shortcut fusion', function(assert) {
6060 actual = _(array).map(iteratee)[methodName](predicate);
6076 lodashStable.each(['includes', 'find'], function(methodName) {
6077 var func = _[methodName],
6078 isIncludes = methodName == 'includes',
6079 resolve = methodName == 'find' ? lodashStable.curry(lodashStable.eq) : identity;
6088 QUnit.test('`_.' + methodName + '` should work with ' + key + ' and a positive `fromIndex`', function(assert) {
6104 QUnit.test('`_.' + methodName + '` should work with ' + key + ' and a `fromIndex` >= `length`', function(assert) {
6125 QUnit.test('`_.' + methodName + '` should work with ' + key + ' and treat falsey `fromIndex` values as `0`', function(assert) {
6137 QUnit.test('`_.' + methodName + '` should work with ' + key + ' and coerce `fromIndex` to an integer', function(assert) {
6155 QUnit.test('`_.' + methodName + '` should work with ' + key + ' and a negative `fromIndex`', function(assert) {
6171 QUnit.test('`_.' + methodName + '` should work with ' + key + ' and a negative `fromIndex` <= `-length`', function(assert) {
6190 lodashStable.each(['findIndex', 'indexOf'], function(methodName) {
6192 func = _[methodName],
6193 resolve = methodName == 'findIndex' ? lodashStable.curry(lodashStable.eq) : identity;
6195 QUnit.test('`_.' + methodName + '` should return the index of the first matched value', function(assert) {
6201 QUnit.test('`_.' + methodName + '` should work with a positive `fromIndex`', function(assert) {
6207 QUnit.test('`_.' + methodName + '` should work with a `fromIndex` >= `length`', function(assert) {
6224 QUnit.test('`_.' + methodName + '` should work with a negative `fromIndex`', function(assert) {
6230 QUnit.test('`_.' + methodName + '` should work with a negative `fromIndex` <= `-length`', function(assert) {
6243 QUnit.test('`_.' + methodName + '` should treat falsey `fromIndex` values as `0`', function(assert) {
6255 QUnit.test('`_.' + methodName + '` should coerce `fromIndex` to an integer', function(assert) {
6435 lodashStable.each(['flatMap', 'flatMapDeep', 'flatMapDepth'], function(methodName) {
6436 var func = _[methodName],
6443 QUnit.test('`_.' + methodName + '` should map values in `array` to a new flattened array', function(assert) {
6452 QUnit.test('`_.' + methodName + '` should work with `_.property` shorthands', function(assert) {
6459 QUnit.test('`_.' + methodName + '` should iterate over own string keyed properties of objects', function(assert) {
6471 QUnit.test('`_.' + methodName + '` should use `_.identity` when `iteratee` is nullish', function(assert) {
6488 QUnit.test('`_.' + methodName + '` should accept a falsey `collection`', function(assert) {
6502 QUnit.test('`_.' + methodName + '` should treat number values for `collection` as empty', function(assert) {
6508 QUnit.test('`_.' + methodName + '` should work with objects with non-number length properties', function(assert) {
6570 lodashStable.each(methodNames, function(methodName) {
6571 var actual = _[methodName](array);
6587 var actual = lodashStable.map(methodNames, function(methodName) {
6588 return _[methodName](array);
6676 lodashStable.each(['flow', 'flowRight'], function(methodName) {
6677 var func = _[methodName],
6678 isFlow = methodName == 'flow';
6680 QUnit.test('`_.' + methodName + '` should supply each function with the return value of the previous', function(assert) {
6689 QUnit.test('`_.' + methodName + '` should return a new function', function(assert) {
6695 QUnit.test('`_.' + methodName + '` should return an identity function when no arguments are given', function(assert) {
6710 QUnit.test('`_.' + methodName + '` should work with a curried function and `_.head`', function(assert) {
6722 QUnit.test('`_.' + methodName + '` should support shortcut fusion', function(assert) {
6764 QUnit.test('`_.' + methodName + '` should work with curried functions with placeholders', function(assert) {
6778 QUnit.test('`_.' + methodName + '` should return a wrapped value when chaining', function(assert) {
6782 var wrapped = _(noop)[methodName]();
6819 lodashStable.each(['forIn', 'forInRight'], function(methodName) {
6820 var func = _[methodName];
6822 QUnit.test('`_.' + methodName + '` iterates over inherited string keyed properties', function(assert) {
6840 lodashStable.each(['forOwn', 'forOwnRight'], function(methodName) {
6841 var func = _[methodName];
6843 QUnit.test('`_.' + methodName + '` should iterate over `length` properties', function(assert) {
6978 lodashStable.each(methods, function(methodName) {
6980 func = _[methodName],
6981 isBy = /(^partition|By)$/.test(methodName),
6982 isFind = /^find/.test(methodName),
6983 isOmitPick = /^(?:omit|pick)By$/.test(methodName),
6984 isSome = methodName == 'some';
6986 QUnit.test('`_.' + methodName + '` should provide correct iteratee arguments', function(assert) {
6997 if (lodashStable.includes(rightMethods, methodName)) {
7001 if (lodashStable.includes(objectMethods, methodName)) {
7014 QUnit.test('`_.' + methodName + '` should treat sparse arrays as dense', function(assert) {
7021 var expected = lodashStable.includes(objectMethods, methodName)
7030 else if (lodashStable.includes(objectMethods, methodName)) {
7036 if (lodashStable.includes(rightMethods, methodName)) {
7053 lodashStable.each(lodashStable.difference(methods, objectMethods), function(methodName) {
7055 func = _[methodName],
7056 isEvery = methodName == 'every';
7060 QUnit.test('`_.' + methodName + '` should not iterate custom properties on arrays', function(assert) {
7078 lodashStable.each(lodashStable.difference(methods, unwrappedMethods), function(methodName) {
7080 isBaseEach = methodName == '_baseEach';
7082 QUnit.test('`_.' + methodName + '` should return a wrapped value when implicitly chaining', function(assert) {
7086 var wrapped = _(array)[methodName](noop);
7095 lodashStable.each(unwrappedMethods, function(methodName) {
7098 QUnit.test('`_.' + methodName + '` should return an unwrapped value when implicitly chaining', function(assert) {
7102 var actual = _(array)[methodName](noop);
7110 QUnit.test('`_.' + methodName + '` should return a wrapped value when explicitly chaining', function(assert) {
7115 actual = wrapped[methodName](noop);
7126 lodashStable.each(lodashStable.difference(methods, arrayMethods, forInMethods), function(methodName) {
7127 var func = _[methodName];
7129 QUnit.test('`_.' + methodName + '` iterates over own string keyed properties of objects', function(assert) {
7148 lodashStable.each(iterationMethods, function(methodName) {
7150 func = _[methodName];
7152 QUnit.test('`_.' + methodName + '` should return the collection', function(assert) {
7164 lodashStable.each(collectionMethods, function(methodName) {
7165 var func = _[methodName];
7167 QUnit.test('`_.' + methodName + '` should use `isArrayLike` to determine whether a value is array-like', function(assert) {
7197 lodashStable.each(methods, function(methodName) {
7198 var func = _[methodName],
7199 isFind = /^find/.test(methodName),
7200 isSome = methodName == 'some',
7201 isReduce = /^reduce/.test(methodName);
7203 QUnit.test('`_.' + methodName + '` should ignore changes to `length`', function(assert) {
7225 lodashStable.each(lodashStable.difference(lodashStable.union(methods, collectionMethods), arrayMethods), function(methodName) {
7226 var func = _[methodName],
7227 isFind = /^find/.test(methodName),
7228 isSome = methodName == 'some',
7229 isReduce = /^reduce/.test(methodName);
7231 QUnit.test('`_.' + methodName + '` should ignore added `object` properties', function(assert) {
7258 lodashStable.each(['assign', 'assignIn', 'defaults', 'defaultsDeep', 'merge'], function(methodName) {
7259 var func = _[methodName],
7260 isAssign = methodName == 'assign',
7261 isDefaults = /^defaults/.test(methodName);
7263 QUnit.test('`_.' + methodName + '` should coerce primitives to objects', function(assert) {
7279 QUnit.test('`_.' + methodName + '` should assign own ' + (isAssign ? '' : 'and inherited ') + 'string keyed source properties', function(assert) {
7291 QUnit.test('`_.' + methodName + '` should not skip a trailing function source', function(assert) {
7300 QUnit.test('`_.' + methodName + '` should not error on nullish sources', function(assert) {
7310 QUnit.test('`_.' + methodName + '` should create an object when `object` is nullish', function(assert) {
7331 QUnit.test('`_.' + methodName + '` should work as an iteratee for methods like `_.reduce`', function(assert) {
7346 QUnit.test('`_.' + methodName + '` should not return the existing wrapped value when chaining', function(assert) {
7351 actual = wrapped[methodName]({ 'b': 2 });
7361 lodashStable.each(['assign', 'assignIn', 'merge'], function(methodName) {
7362 var func = _[methodName];
7364 QUnit.test('`_.' + methodName + '` should not treat `object` as `source`', function(assert) {
7375 lodashStable.each(['assign', 'assignIn', 'assignInWith', 'assignWith', 'defaults', 'defaultsDeep', 'merge', 'mergeWith'], function(methodName) {
7376 var func = _[methodName];
7378 QUnit.test('`_.' + methodName + '` should not assign values that are the same as their destinations', function(assert) {
7398 lodashStable.each(['assignWith', 'assignInWith', 'mergeWith'], function(methodName) {
7399 var func = _[methodName],
7400 isMergeWith = methodName == 'mergeWith';
7402 QUnit.test('`_.' + methodName + '` should provide correct `customizer` arguments', function(assert) {
7445 QUnit.test('`_.' + methodName + '` should not treat the second argument as a `customizer` callback', function(assert) {
7463 lodashStable.each(['_baseEach', 'forEach', 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'transform'], function(methodName) {
7464 var func = _[methodName];
7466 QUnit.test('`_.' + methodName + '` can exit early when iterating arrays', function(assert) {
7478 assert.deepEqual(values, [lodashStable.endsWith(methodName, 'Right') ? 3 : 1]);
7485 QUnit.test('`_.' + methodName + '` can exit early when iterating objects', function(assert) {
7543 var actual = lodashStable.map(methods, function(methodName) {
7544 var result = _[methodName]({}, source);
7822 lodashStable.each(['has', 'hasIn'], function(methodName) {
7823 var func = _[methodName],
7824 isHas = methodName == 'has',
7832 QUnit.test('`_.' + methodName + '` should check for own properties', function(assert) {
7842 QUnit.test('`_.' + methodName + '` should not use the `hasOwnProperty` method of `object`', function(assert) {
7849 QUnit.test('`_.' + methodName + '` should support deep paths', function(assert) {
7863 QUnit.test('`_.' + methodName + '` should coerce `path` to a string', function(assert) {
7882 QUnit.test('`_.' + methodName + '` should work with `arguments` objects', function(assert) {
7888 QUnit.test('`_.' + methodName + '` should work with a non-string `path`', function(assert) {
7898 QUnit.test('`_.' + methodName + '` should preserve the sign of `0`', function(assert) {
7912 QUnit.test('`_.' + methodName + '` should work with a symbol `path`', function(assert) {
7937 QUnit.test('`_.' + methodName + '` should check for a key over a path', function(assert) {
7947 QUnit.test('`_.' + methodName + '` should return `true` for indexes of sparse values', function(assert) {
7960 QUnit.test('`_.' + methodName + '` should return `true` for indexes of sparse values with deep paths', function(assert) {
7975 QUnit.test('`_.' + methodName + '` should return `' + (isHas ? 'false' : 'true') + '` for inherited properties', function(assert) {
7986 QUnit.test('`_.' + methodName + '` should return `' + (isHas ? 'false' : 'true') + '` for nested inherited properties', function(assert) {
7997 QUnit.test('`_.' + methodName + '` should return `false` when `object` is nullish', function(assert) {
8012 QUnit.test('`_.' + methodName + '` should return `false` for deep paths when `object` is nullish', function(assert) {
8027 QUnit.test('`_.' + methodName + '` should return `false` for nullish values of nested objects', function(assert) {
8043 QUnit.test('`_.' + methodName + '` should return `false` over sparse values of deep paths', function(assert) {
8141 lodashStable.each(['head', 'first'], function(methodName) {
8144 actual = _(array).filter(isEven)[methodName]();
8146 assert.strictEqual(actual, _[methodName](_.filter(array, isEven)));
8440 lodashStable.each(['intersection', 'intersectionBy', 'intersectionWith'], function(methodName) {
8441 var func = _[methodName];
8443 QUnit.test('`_.' + methodName + '` should return the intersection of two arrays', function(assert) {
8450 QUnit.test('`_.' + methodName + '` should return the intersection of multiple arrays', function(assert) {
8457 QUnit.test('`_.' + methodName + '` should return an array of unique values', function(assert) {
8464 QUnit.test('`_.' + methodName + '` should work with a single array', function(assert) {
8471 QUnit.test('`_.' + methodName + '` should work with `arguments` objects', function(assert) {
8481 QUnit.test('`_.' + methodName + '` should treat `-0` as `0`', function(assert) {
8494 QUnit.test('`_.' + methodName + '` should match `NaN`', function(assert) {
8501 QUnit.test('`_.' + methodName + '` should work with large arrays of `-0` as `0`', function(assert) {
8515 QUnit.test('`_.' + methodName + '` should work with large arrays of `NaN`', function(assert) {
8522 QUnit.test('`_.' + methodName + '` should work with large arrays of objects', function(assert) {
8532 QUnit.test('`_.' + methodName + '` should treat values that are not arrays or `arguments` objects as empty', function(assert) {
8541 QUnit.test('`_.' + methodName + '` should return a wrapped value when chaining', function(assert) {
8545 var wrapped = _([1, 3, 2])[methodName]([5, 2, 1, 4]);
8835 QUnit.test('should work with a function for `methodName`', function(assert) {
10712 lodashStable.each(['isInteger', 'isSafeInteger'], function(methodName) {
10713 var func = _[methodName],
10714 isSafe = methodName == 'isSafeInteger';
10716 QUnit.test('`_.' + methodName + '` should return `true` for integer values', function(assert) {
12061 lodashStable.each(funcs, function(methodName) {
12063 Foo.prototype = root[methodName.slice(2)].prototype;
12067 assert.strictEqual(_[methodName](object), false, '`_.' + methodName + '` returns `false`');
12086 lodashStable.each(funcs, function(methodName) {
12088 _[methodName](xml);
12089 assert.ok(true, '`_.' + methodName + '` should not error');
12957 lodashStable.each(['keys', 'keysIn'], function(methodName) {
12958 var func = _[methodName],
12959 isKeys = methodName == 'keys';
12961 QUnit.test('`_.' + methodName + '` should return the string keyed property names of `object`', function(assert) {
12969 QUnit.test('`_.' + methodName + '` should ' + (isKeys ? 'not ' : '') + 'include inherited string keyed properties', function(assert) {
12983 QUnit.test('`_.' + methodName + '` should treat sparse arrays as dense', function(assert) {
12994 QUnit.test('`_.' + methodName + '` should return keys for custom properties on arrays', function(assert) {
13005 QUnit.test('`_.' + methodName + '` should ' + (isKeys ? 'not ' : '') + 'include inherited string keyed properties of arrays', function(assert) {
13018 QUnit.test('`_.' + methodName + '` should work with `arguments` objects', function(assert) {
13031 QUnit.test('`_.' + methodName + '` should return keys for custom properties on `arguments` objects', function(assert) {
13047 QUnit.test('`_.' + methodName + '` should ' + (isKeys ? 'not ' : '') + 'include inherited string keyed properties of `arguments` objects', function(assert) {
13063 QUnit.test('`_.' + methodName + '` should work with string objects', function(assert) {
13071 QUnit.test('`_.' + methodName + '` should return keys for custom properties on string objects', function(assert) {
13082 QUnit.test('`_.' + methodName + '` should ' + (isKeys ? 'not ' : '') + 'include inherited string keyed properties of string objects', function(assert) {
13095 QUnit.test('`_.' + methodName + '` should work with array-like objects', function(assert) {
13104 QUnit.test('`_.' + methodName + '` should coerce primitives to objects (test in IE 9)', function(assert) {
13120 QUnit.test('`_.' + methodName + '` skips the `constructor` property on prototype objects', function(assert) {
13137 QUnit.test('`_.' + methodName + '` should return an empty array when `object` is nullish', function(assert) {
13313 lodashStable.each(['findLastIndex', 'lastIndexOf'], function(methodName) {
13315 func = _[methodName],
13316 resolve = methodName == 'findLastIndex' ? lodashStable.curry(lodashStable.eq) : identity;
13318 QUnit.test('`_.' + methodName + '` should return the index of the last matched value', function(assert) {
13324 QUnit.test('`_.' + methodName + '` should work with a positive `fromIndex`', function(assert) {
13330 QUnit.test('`_.' + methodName + '` should work with a `fromIndex` >= `length`', function(assert) {
13347 QUnit.test('`_.' + methodName + '` should work with a negative `fromIndex`', function(assert) {
13353 QUnit.test('`_.' + methodName + '` should work with a negative `fromIndex` <= `-length`', function(assert) {
13366 QUnit.test('`_.' + methodName + '` should treat falsey `fromIndex` values correctly', function(assert) {
13380 QUnit.test('`_.' + methodName + '` should coerce `fromIndex` to an integer', function(assert) {
13391 lodashStable.each(['indexOf', 'lastIndexOf', 'sortedIndexOf', 'sortedLastIndexOf'], function(methodName) {
13392 var func = _[methodName],
13393 isIndexOf = !/last/i.test(methodName),
13394 isSorted = /^sorted/.test(methodName);
13396 QUnit.test('`_.' + methodName + '` should accept a falsey `array`', function(assert) {
13410 QUnit.test('`_.' + methodName + '` should return `-1` for an unmatched value', function(assert) {
13424 QUnit.test('`_.' + methodName + '` should not match values on empty arrays', function(assert) {
13434 QUnit.test('`_.' + methodName + '` should match `NaN`', function(assert) {
13452 QUnit.test('`_.' + methodName + '` should match `-0` as `0`', function(assert) {
13708 lodashStable.each(['mapKeys', 'mapValues'], function(methodName) {
13709 var func = _[methodName],
13712 QUnit.test('`_.' + methodName + '` should iterate over own string keyed properties of objects', function(assert) {
13724 QUnit.test('`_.' + methodName + '` should accept a falsey `object`', function(assert) {
13738 QUnit.test('`_.' + methodName + '` should return a wrapped value when chaining', function(assert) {
13742 assert.ok(_(object)[methodName](noop) instanceof _);
13787 lodashStable.each(['matches', 'isMatch'], function(methodName) {
13788 var isMatches = methodName == 'matches';
13796 QUnit.test('`_.' + methodName + '` should perform a deep comparison between `source` and `object`', function(assert) {
13819 QUnit.test('`_.' + methodName + '` should match inherited string keyed `object` properties', function(assert) {
13833 QUnit.test('`_.' + methodName + '` should not match by inherited `source` properties', function(assert) {
13849 QUnit.test('`_.' + methodName + '` should compare a variety of `source` property values', function(assert) {
13860 QUnit.test('`_.' + methodName + '` should match `-0` as `0`', function(assert) {
13873 QUnit.test('`_.' + methodName + '` should compare functions by reference', function(assert) {
13886 QUnit.test('`_.' + methodName + '` should work with a function for `object`', function(assert) {
13896 QUnit.test('`_.' + methodName + '` should work with a function for `source`', function(assert) {
13910 QUnit.test('`_.' + methodName + '` should work with a non-plain `object`', function(assert) {
13921 QUnit.test('`_.' + methodName + '` should partial match arrays', function(assert) {
13936 QUnit.test('`_.' + methodName + '` should partial match arrays with duplicate values', function(assert) {
13957 QUnit.test('`_.' + methodName + '` should partial match maps', function(assert) {
13987 QUnit.test('`_.' + methodName + '` should partial match sets', function(assert) {
14017 QUnit.test('`_.' + methodName + '` should match `undefined` values', function(assert) {
14036 QUnit.test('`_.' + methodName + '` should match `undefined` values on primitives', function(assert) {
14065 QUnit.test('`_.' + methodName + '` should return `false` when `object` is nullish', function(assert) {
14081 QUnit.test('`_.' + methodName + '` should return `true` when comparing an empty `source`', function(assert) {
14095 QUnit.test('`_.' + methodName + '` should return `true` when comparing an empty `source` to a nullish `object`', function(assert) {
14111 QUnit.test('`_.' + methodName + '` should return `true` when comparing a `source` of empty arrays and objects', function(assert) {
15680 lodashStable.each(['max', 'maxBy', 'min', 'minBy'], function(methodName) {
15681 var func = _[methodName],
15682 isMax = /^max/.test(methodName);
15684 QUnit.test('`_.' + methodName + '` should work with Date objects', function(assert) {
15693 QUnit.test('`_.' + methodName + '` should work with extremely large arrays', function(assert) {
15700 QUnit.test('`_.' + methodName + '` should work when chaining on an array with only one value', function(assert) {
15704 var actual = _([40])[methodName]();
15713 lodashStable.each(['maxBy', 'minBy'], function(methodName) {
15715 func = _[methodName],
15716 isMax = methodName == 'maxBy';
15718 QUnit.test('`_.' + methodName + '` should work with an `iteratee`', function(assert) {
15742 QUnit.test('`_.' + methodName + '` should work when `iteratee` returns +/-Infinity', function(assert) {
16565 lodashStable.each(['omit', 'omitBy'], function(methodName) {
16567 func = _[methodName],
16571 if (methodName == 'omitBy') {
16582 QUnit.test('`_.' + methodName + '` should create an object with omitted string keyed properties', function(assert) {
16589 QUnit.test('`_.' + methodName + '` should include inherited string keyed properties', function(assert) {
16598 QUnit.test('`_.' + methodName + '` should preserve the sign of `0`', function(assert) {
16612 QUnit.test('`_.' + methodName + '` should include symbols', function(assert) {
16644 QUnit.test('`_.' + methodName + '` should create an object with omitted symbols', function(assert) {
16684 QUnit.test('`_.' + methodName + '` should work with an array `object`', function(assert) {
17166 lodashStable.each(['pad', 'padStart', 'padEnd'], function(methodName) {
17167 var func = _[methodName],
17168 isPad = methodName == 'pad',
17169 isStart = methodName == 'padStart',
17172 QUnit.test('`_.' + methodName + '` should not pad if string is >= `length`', function(assert) {
17179 QUnit.test('`_.' + methodName + '` should treat negative `length` as `0`', function(assert) {
17187 QUnit.test('`_.' + methodName + '` should coerce `length` to a number', function(assert) {
17196 QUnit.test('`_.' + methodName + '` should treat nullish values as empty strings', function(assert) {
17207 QUnit.test('`_.' + methodName + '` should return `string` when `chars` coerces to an empty string', function(assert) {
17323 lodashStable.each(['partial', 'partialRight'], function(methodName) {
17324 var func = _[methodName],
17325 isPartial = methodName == 'partial',
17328 QUnit.test('`_.' + methodName + '` partially applies arguments', function(assert) {
17335 QUnit.test('`_.' + methodName + '` creates a function that can be invoked with additional arguments', function(assert) {
17345 QUnit.test('`_.' + methodName + '` works when there are no partially applied arguments and the created function is invoked without additional arguments', function(assert) {
17354 QUnit.test('`_.' + methodName + '` works when there are no partially applied arguments and the created function is invoked with additional arguments', function(assert) {
17361 QUnit.test('`_.' + methodName + '` should support placeholders', function(assert) {
17379 QUnit.test('`_.' + methodName + '` should use `_.placeholder` when set', function(assert) {
17396 QUnit.test('`_.' + methodName + '` creates a function with a `length` of `0`', function(assert) {
17405 QUnit.test('`_.' + methodName + '` should ensure `new par` is an instance of `func`', function(assert) {
17419 QUnit.test('`_.' + methodName + '` should clone metadata for created functions', function(assert) {
17435 QUnit.test('`_.' + methodName + '` should work with curried functions', function(assert) {
17640 lodashStable.each(['curry', 'curryRight'], function(methodName, index) {
17642 curried = _[methodName](fn),
17652 var curried = _[methodName](fn);
17659 lodashStable.each(['partial', 'partialRight'], function(methodName, index) {
17660 var func = _[methodName],
17841 lodashStable.each(['pick', 'pickBy'], function(methodName) {
17843 func = _[methodName],
17844 isPick = methodName == 'pick',
17848 if (methodName == 'pickBy') {
17859 QUnit.test('`_.' + methodName + '` should create an object of picked string keyed properties', function(assert) {
17866 QUnit.test('`_.' + methodName + '` should pick inherited string keyed properties', function(assert) {
17876 QUnit.test('`_.' + methodName + '` should preserve the sign of `0`', function(assert) {
17890 QUnit.test('`_.' + methodName + '` should pick symbols', function(assert) {
17926 QUnit.test('`_.' + methodName + '` should work with an array `object`', function(assert) {
18284 lodashStable.each(['pull', 'pullAll', 'pullAllWith'], function(methodName) {
18285 var func = _[methodName],
18286 isPull = methodName == 'pull';
18294 QUnit.test('`_.' + methodName + '` should modify and return the array', function(assert) {
18304 QUnit.test('`_.' + methodName + '` should preserve holes in arrays', function(assert) {
18316 QUnit.test('`_.' + methodName + '` should treat holes as `undefined`', function(assert) {
18326 QUnit.test('`_.' + methodName + '` should match `NaN`', function(assert) {
18604 lodashStable.each(['range', 'rangeRight'], function(methodName) {
18605 var func = _[methodName],
18606 isRange = methodName == 'range';
18612 QUnit.test('`_.' + methodName + '` should infer the sign of `step` when only `end` is given', function(assert) {
18619 QUnit.test('`_.' + methodName + '` should infer the sign of `step` when only `start` and `end` are given', function(assert) {
18626 QUnit.test('`_.' + methodName + '` should work with a `start`, `end`, and `step`', function(assert) {
18634 QUnit.test('`_.' + methodName + '` should support a `step` of `0`', function(assert) {
18640 QUnit.test('`_.' + methodName + '` should work with a `step` larger than `end`', function(assert) {
18646 QUnit.test('`_.' + methodName + '` should work with a negative `step`', function(assert) {
18653 QUnit.test('`_.' + methodName + '` should support `start` of `-0`', function(assert) {
18660 QUnit.test('`_.' + methodName + '` should treat falsey `start` as `0`', function(assert) {
18673 QUnit.test('`_.' + methodName + '` should coerce arguments to finite numbers', function(assert) {
18687 QUnit.test('`_.' + methodName + '` should work as an iteratee for methods like `_.map`', function(assert) {
18917 lodashStable.each(['reduce', 'reduceRight'], function(methodName) {
18918 var func = _[methodName],
18920 isReduce = methodName == 'reduce';
18922 QUnit.test('`_.' + methodName + '` should reduce a collection to a single value', function(assert) {
18932 QUnit.test('`_.' + methodName + '` should support empty collections without an initial `accumulator` value', function(assert) {
18947 QUnit.test('`_.' + methodName + '` should support empty collections with an initial `accumulator` value', function(assert) {
18961 QUnit.test('`_.' + methodName + '` should handle an initial `accumulator` value of `undefined`', function(assert) {
18968 QUnit.test('`_.' + methodName + '` should return `undefined` for empty collections when no `accumulator` is given (test in IE > 9 and modern browsers)', function(assert) {
18984 QUnit.test('`_.' + methodName + '` should return an unwrapped value when implicitly chaining', function(assert) {
18988 assert.strictEqual(_(array)[methodName](add), 6);
18995 QUnit.test('`_.' + methodName + '` should return a wrapped value when explicitly chaining', function(assert) {
18999 assert.ok(_(array).chain()[methodName](add) instanceof _);
19025 lodashStable.each(['filter', 'reject'], function(methodName) {
19027 func = _[methodName],
19028 isFilter = methodName == 'filter',
19031 QUnit.test('`_.' + methodName + '` should not modify the resulting value from within `predicate`', function(assert) {
19042 QUnit.test('`_.' + methodName + '` should work with `_.property` shorthands', function(assert) {
19048 QUnit.test('`_.' + methodName + '` should work with `_.matches` shorthands', function(assert) {
19054 QUnit.test('`_.' + methodName + '` should not modify wrapped values', function(assert) {
19060 var actual = wrapped[methodName](function(n) {
19066 actual = wrapped[methodName](function(n) {
19077 QUnit.test('`_.' + methodName + '` should work in a lazy sequence', function(assert) {
19088 var actual = _(array).slice(1).map(square)[methodName](predicate).value();
19089 assert.deepEqual(actual, _[methodName](lodashStable.map(array.slice(1), square), predicate));
19091 actual = _(object).mapValues(square)[methodName](predicate).value();
19092 assert.deepEqual(actual, _[methodName](lodashStable.mapValues(object, square), predicate));
19099 QUnit.test('`_.' + methodName + '` should provide correct `predicate` arguments in a lazy sequence', function(assert) {
19107 _(array).slice(1)[methodName](function(value, index, array) {
19114 _(array).slice(1).map(square)[methodName](function(value, index, array) {
19121 _(array).slice(1).map(square)[methodName](function(value, index) {
19128 _(array).slice(1).map(square)[methodName](function(value) {
19135 _(array).slice(1).map(square)[methodName](function() {
19361 lodashStable.each(['get', 'result'], function(methodName) {
19362 var func = _[methodName];
19364 QUnit.test('`_.' + methodName + '` should get string keyed property values', function(assert) {
19374 QUnit.test('`_.' + methodName + '` should preserve the sign of `0`', function(assert) {
19387 QUnit.test('`_.' + methodName + '` should get symbol keyed property values', function(assert) {
19401 QUnit.test('`_.' + methodName + '` should get deep property values', function(assert) {
19411 QUnit.test('`_.' + methodName + '` should get a key over a path', function(assert) {
19421 QUnit.test('`_.' + methodName + '` should not coerce array paths to strings', function(assert) {
19428 QUnit.test('`_.' + methodName + '` should not ignore empty brackets', function(assert) {
19435 QUnit.test('`_.' + methodName + '` should handle empty paths', function(assert) {
19444 QUnit.test('`_.' + methodName + '` should handle complex paths', function(assert) {
19459 QUnit.test('`_.' + methodName + '` should return `undefined` when `object` is nullish', function(assert) {
19468 QUnit.test('`_.' + methodName + '` should return `undefined` for deep paths when `object` is nullish', function(assert) {
19484 QUnit.test('`_.' + methodName + '` should return `undefined` if parts of `path` are missing', function(assert) {
19494 QUnit.test('`_.' + methodName + '` should be able to return `null` values', function(assert) {
19504 QUnit.test('`_.' + methodName + '` should follow `path` over non-plain objects', function(assert) {
19516 QUnit.test('`_.' + methodName + '` should return the default value for `undefined` values', function(assert) {
19532 QUnit.test('`_.' + methodName + '` should return the default value when `path` is empty', function(assert) {
19691 lodashStable.each(['map', 'filter'], function(methodName) {
19694 actual = _(array)[methodName](identity).thru(_.compact).reverse().value();
19699 actual = _(array).thru(_.compact)[methodName](identity).pull(1).push(3).reverse().value();
19734 lodashStable.each(['ceil', 'floor', 'round'], function(methodName) {
19735 var func = _[methodName],
19736 isCeil = methodName == 'ceil',
19737 isFloor = methodName == 'floor';
19739 QUnit.test('`_.' + methodName + '` should return a rounded number without a precision', function(assert) {
19746 QUnit.test('`_.' + methodName + '` should work with a precision of `0`', function(assert) {
19753 QUnit.test('`_.' + methodName + '` should work with a positive precision', function(assert) {
19763 QUnit.test('`_.' + methodName + '` should work with a negative precision', function(assert) {
19770 QUnit.test('`_.' + methodName + '` should coerce `precision` to an integer', function(assert) {
19785 QUnit.test('`_.' + methodName + '` should work with exponential notation and `precision`', function(assert) {
19798 QUnit.test('`_.' + methodName + '` should preserve the sign of `0`', function(assert) {
19811 QUnit.test('`_.' + methodName + '` should not return `NaN` for large `precision` values', function(assert) {
19825 QUnit.test('`_.' + methodName + '` should return `Infinity` given `Infinity` regardless of `precision`', function(assert) {
19847 QUnit.test('`_.' + methodName + '` should return `-Infinity` given `-Infinity` regardless of `precision`', function(assert) {
19869 QUnit.test('`_.' + methodName + '` should return `NaN` given `NaN` regardless of `precision`', function(assert) {
20094 lodashStable.each(['update', 'updateWith', 'set', 'setWith'], function(methodName) {
20095 var func = _[methodName],
20096 isUpdate = /^update/.test(methodName);
20102 QUnit.test('`_.' + methodName + '` should set property values', function(assert) {
20114 QUnit.test('`_.' + methodName + '` should preserve the sign of `0`', function(assert) {
20129 QUnit.test('`_.' + methodName + '` should unset symbol keyed property values', function(assert) {
20144 QUnit.test('`_.' + methodName + '` should set deep property values', function(assert) {
20156 QUnit.test('`_.' + methodName + '` should set a key over a path', function(assert) {
20168 QUnit.test('`_.' + methodName + '` should not coerce array paths to strings', function(assert) {
20177 QUnit.test('`_.' + methodName + '` should not ignore empty brackets', function(assert) {
20186 QUnit.test('`_.' + methodName + '` should handle empty paths', function(assert) {
20200 QUnit.test('`_.' + methodName + '` should handle complex paths', function(assert) {
20217 QUnit.test('`_.' + methodName + '` should create parts of `path` that are missing', function(assert) {
20233 QUnit.test('`_.' + methodName + '` should not error when `object` is nullish', function(assert) {
20250 QUnit.test('`_.' + methodName + '` should overwrite primitives in the path', function(assert) {
20261 QUnit.test('`_.' + methodName + '` should not create an array for missing non-index property names that start with numbers', function(assert) {
20270 QUnit.test('`_.' + methodName + '` should not assign values that are the same as their destinations', function(assert) {
20566 lodashStable.each(['map', 'filter'], function(methodName) {
20567 assert.deepEqual(wrapped[methodName]().slice(0, -1).value(), array.slice(0, -1));
20568 assert.deepEqual(wrapped[methodName]().slice(1).value(), array.slice(1));
20569 assert.deepEqual(wrapped[methodName]().slice(1, 3).value(), array.slice(1, 3));
20570 assert.deepEqual(wrapped[methodName]().slice(-1).value(), array.slice(-1));
20572 assert.deepEqual(wrapped[methodName]().slice(length).value(), array.slice(length));
20573 assert.deepEqual(wrapped[methodName]().slice(3, 2).value(), array.slice(3, 2));
20574 assert.deepEqual(wrapped[methodName]().slice(0, -length).value(), array.slice(0, -length));
20575 assert.deepEqual(wrapped[methodName]().slice(0, null).value(), array.slice(0, null));
20577 assert.deepEqual(wrapped[methodName]().slice(0, length).value(), array.slice(0, length));
20578 assert.deepEqual(wrapped[methodName]().slice(-length).value(), array.slice(-length));
20579 assert.deepEqual(wrapped[methodName]().slice(null).value(), array.slice(null));
20581 assert.deepEqual(wrapped[methodName]().slice(0, 1).value(), array.slice(0, 1));
20582 assert.deepEqual(wrapped[methodName]().slice(NaN, '1').value(), array.slice(NaN, '1'));
20584 assert.deepEqual(wrapped[methodName]().slice(0.1, 1.1).value(), array.slice(0.1, 1.1));
20585 assert.deepEqual(wrapped[methodName]().slice('0', 1).value(), array.slice('0', 1));
20586 assert.deepEqual(wrapped[methodName]().slice(0, '1').value(), array.slice(0, '1'));
20587 assert.deepEqual(wrapped[methodName]().slice('1').value(), array.slice('1'));
20588 assert.deepEqual(wrapped[methodName]().slice(NaN, 1).value(), array.slice(NaN, 1));
20589 assert.deepEqual(wrapped[methodName]().slice(1, NaN).value(), array.slice(1, NaN));
20786 lodashStable.each(['orderBy', 'sortBy'], function(methodName) {
20787 var func = _[methodName];
20817 QUnit.test('`_.' + methodName + '` should sort multiple properties in ascending order', function(assert) {
20824 QUnit.test('`_.' + methodName + '` should support iteratees', function(assert) {
20831 QUnit.test('`_.' + methodName + '` should perform a stable sort (test in IE > 8 and V8)', function(assert) {
20840 QUnit.test('`_.' + methodName + '` should not error on nullish elements', function(assert) {
20850 QUnit.test('`_.' + methodName + '` should work as an iteratee for methods like `_.reduce`', function(assert) {
20882 lodashStable.each(['sortedIndex', 'sortedLastIndex'], function(methodName) {
20883 var func = _[methodName],
20884 isSortedIndex = methodName == 'sortedIndex';
20886 QUnit.test('`_.' + methodName + '` should return the insert index', function(assert) {
20900 QUnit.test('`_.' + methodName + '` should work with an array of strings', function(assert) {
20914 QUnit.test('`_.' + methodName + '` should accept a nullish `array` and a `value`', function(assert) {
20927 QUnit.test('`_.' + methodName + '` should align with `_.sortBy`', function(assert) {
20948 QUnit.test('`_.' + methodName + '` should align with `_.sortBy` for nulls', function(assert) {
20958 QUnit.test('`_.' + methodName + '` should align with `_.sortBy` for symbols', function(assert) {
20976 lodashStable.each(['sortedIndexBy', 'sortedLastIndexBy'], function(methodName) {
20977 var func = _[methodName],
20978 isSortedIndexBy = methodName == 'sortedIndexBy';
20980 QUnit.test('`_.' + methodName + '` should provide correct `iteratee` arguments', function(assert) {
20992 QUnit.test('`_.' + methodName + '` should work with `_.property` shorthands', function(assert) {
21001 QUnit.test('`_.' + methodName + '` should support arrays larger than `MAX_ARRAY_LENGTH / 2`', function(assert) {
21033 lodashStable.each(['sortedIndexOf', 'sortedLastIndexOf'], function(methodName) {
21034 var func = _[methodName],
21035 isSortedIndexOf = methodName == 'sortedIndexOf';
21037 QUnit.test('`_.' + methodName + '` should perform a binary search', function(assert) {
21258 lodashStable.each(['startsWith', 'endsWith'], function(methodName) {
21259 var func = _[methodName],
21260 isStartsWith = methodName == 'startsWith';
21265 QUnit.test('`_.' + methodName + '` should coerce `string` to a string', function(assert) {
21272 QUnit.test('`_.' + methodName + '` should coerce `target` to a string', function(assert) {
21279 QUnit.test('`_.' + methodName + '` should coerce `position` to a number', function(assert) {
21303 lodashStable.each(['noop', 'stubTrue', 'stubFalse', 'stubArray', 'stubObject', 'stubString'], function(methodName) {
21304 var func = _[methodName];
21313 })[methodName];
21318 QUnit.test('`_.' + methodName + '` should return ' + pair[1], function(assert) {
21357 lodashStable.each(['add', 'divide', 'multiply', 'subtract'], function(methodName) {
21358 var func = _[methodName],
21359 isAddSub = methodName == 'add' || methodName == 'subtract';
21361 QUnit.test('`_.' + methodName + '` should return `' + (isAddSub ? 0 : 1) + '` when no arguments are given', function(assert) {
21367 QUnit.test('`_.' + methodName + '` should work with only one defined argument', function(assert) {
21375 QUnit.test('`_.' + methodName + '` should preserve the sign of `0`', function(assert) {
21391 QUnit.test('`_.' + methodName + '` should convert objects to `NaN`', function(assert) {
21398 QUnit.test('`_.' + methodName + '` should convert symbols to `NaN`', function(assert) {
21410 QUnit.test('`_.' + methodName + '` should return an unwrapped value when implicitly chaining', function(assert) {
21414 var actual = _(1)[methodName](2);
21422 QUnit.test('`_.' + methodName + '` should return a wrapped value when explicitly chaining', function(assert) {
21426 var actual = _(1).chain()[methodName](2);
21478 lodashStable.each(['sum', 'sumBy'], function(methodName) {
21480 func = _[methodName];
21482 QUnit.test('`_.' + methodName + '` should return the sum of an array of numbers', function(assert) {
21488 QUnit.test('`_.' + methodName + '` should return `0` when passing empty `array` values', function(assert) {
21500 QUnit.test('`_.' + methodName + '` should skip `undefined` values', function(assert) {
21506 QUnit.test('`_.' + methodName + '` should not skip `NaN` values', function(assert) {
21512 QUnit.test('`_.' + methodName + '` should not coerce values to numbers', function(assert) {
22975 lodashStable.each(['debounce', 'throttle'], function(methodName) {
22976 var func = _[methodName],
22977 isDebounce = methodName == 'debounce';
22979 QUnit.test('`_.' + methodName + '` should not error for non-object `options` values', function(assert) {
22986 QUnit.test('`_.' + methodName + '` should use a default `wait` of `0`', function(assert) {
23003 QUnit.test('`_.' + methodName + '` should invoke `func` with the correct `this` binding', function(assert) {
23022 QUnit.test('`_.' + methodName + '` supports recursive calls', function(assert) {
23053 QUnit.test('`_.' + methodName + '` should work if the system time is set backwards', function(assert) {
23072 var funced = lodash[methodName](function() {
23090 QUnit.test('`_.' + methodName + '` should support cancelling delayed calls', function(assert) {
23110 QUnit.test('`_.' + methodName + '` should reset `lastCalled` after cancelling', function(assert) {
23133 QUnit.test('`_.' + methodName + '` should support flushing delayed calls', function(assert) {
23153 QUnit.test('`_.' + methodName + '` should noop `cancel` and `flush` when nothing is queued', function(assert) {
23359 lodashStable.each(['slice', 'toArray'], function(methodName) {
23361 func = _[methodName];
23363 QUnit.test('`_.' + methodName + '` should return a dense array', function(assert) {
23376 QUnit.test('`_.' + methodName + '` should treat array-like objects like arrays', function(assert) {
23384 QUnit.test('`_.' + methodName + '` should return a shallow clone of arrays', function(assert) {
23392 QUnit.test('`_.' + methodName + '` should work with a node list for `collection`', function(assert) {
23412 lodashStable.each(['toInteger', 'toSafeInteger'], function(methodName) {
23413 var func = _[methodName],
23414 isSafe = methodName == 'toSafeInteger';
23416 QUnit.test('`_.' + methodName + '` should convert values to integers', function(assert) {
23429 QUnit.test('`_.' + methodName + '` should support `value` of `-0`', function(assert) {
23469 lodashStable.each(['toFinite', 'toInteger', 'toNumber', 'toSafeInteger'], function(methodName) {
23470 var func = _[methodName];
23472 QUnit.test('`_.' + methodName + '` should preserve the sign of `0`', function(assert) {
23491 lodashStable.each(['toFinite', 'toInteger', 'toLength', 'toNumber', 'toSafeInteger'], function(methodName) {
23492 var func = _[methodName],
23493 isToFinite = methodName == 'toFinite',
23494 isToLength = methodName == 'toLength',
23495 isToNumber = methodName == 'toNumber',
23496 isToSafeInteger = methodName == 'toSafeInteger';
23510 QUnit.test('`_.' + methodName + '` should pass thru primitive number values', function(assert) {
23524 QUnit.test('`_.' + methodName + '` should convert number primitives and objects to numbers', function(assert) {
23555 QUnit.test('`_.' + methodName + '` should convert string primitives and objects to numbers', function(assert) {
23596 QUnit.test('`_.' + methodName + '` should convert binary/octal strings to numbers', function(assert) {
23617 QUnit.test('`_.' + methodName + '` should convert invalid binary/octal strings to `' + (isToNumber ? 'NaN' : '0') + '`', function(assert) {
23636 QUnit.test('`_.' + methodName + '` should convert symbols to `' + (isToNumber ? 'NaN' : '0') + '`', function(assert) {
23655 QUnit.test('`_.' + methodName + '` should convert empty values to `0` or `NaN`', function(assert) {
23671 QUnit.test('`_.' + methodName + '` should coerce objects to numbers', function(assert) {
23751 lodashStable.each(['toPairs', 'toPairsIn'], function(methodName) {
23752 var func = _[methodName],
23753 isToPairs = methodName == 'toPairs';
23755 QUnit.test('`_.' + methodName + '` should create an array of string keyed-value pairs', function(assert) {
23764 QUnit.test('`_.' + methodName + '` should ' + (isToPairs ? 'not ' : '') + 'include inherited string keyed property values', function(assert) {
23778 QUnit.test('`_.' + methodName + '` should convert objects with a `length` property', function(assert) {
23787 QUnit.test('`_.' + methodName + '` should convert maps', function(assert) {
23801 QUnit.test('`_.' + methodName + '` should convert sets', function(assert) {
23815 QUnit.test('`_.' + methodName + '` should convert strings', function(assert) {
24237 lodashStable.each(['trim', 'trimStart', 'trimEnd'], function(methodName, index) {
24238 var func = _[methodName],
24249 QUnit.test('`_.' + methodName + '` should remove ' + parts + ' whitespace', function(assert) {
24258 QUnit.test('`_.' + methodName + '` should coerce `string` to a string', function(assert) {
24267 QUnit.test('`_.' + methodName + '` should remove ' + parts + ' `chars`', function(assert) {
24276 QUnit.test('`_.' + methodName + '` should coerce `chars` to a string', function(assert) {
24286 QUnit.test('`_.' + methodName + '` should return an empty string for empty values and `chars`', function(assert) {
24296 QUnit.test('`_.' + methodName + '` should work with `undefined` or empty string values for `chars`', function(assert) {
24306 QUnit.test('`_.' + methodName + '` should work as an iteratee for methods like `_.map`', function(assert) {
24316 QUnit.test('`_.' + methodName + '` should return an unwrapped value when implicitly chaining', function(assert) {
24323 assert.strictEqual(_(string)[methodName](), expected);
24330 QUnit.test('`_.' + methodName + '` should return a wrapped value when explicitly chaining', function(assert) {
24335 assert.ok(_(string).chain()[methodName]() instanceof _);
24597 lodashStable.each(['union', 'unionBy', 'unionWith'], function(methodName) {
24598 var func = _[methodName];
24600 QUnit.test('`_.' + methodName + '` should return the union of two arrays', function(assert) {
24607 QUnit.test('`_.' + methodName + '` should return the union of multiple arrays', function(assert) {
24614 QUnit.test('`_.' + methodName + '` should not flatten nested arrays', function(assert) {
24621 QUnit.test('`_.' + methodName + '` should ignore values that are not arrays or `arguments` objects', function(assert) {
24699 lodashStable.each(['uniq', 'uniqBy', 'uniqWith', 'sortedUniq', 'sortedUniqBy'], function(methodName) {
24700 var func = _[methodName],
24701 isSorted = /^sorted/.test(methodName),
24708 QUnit.test('`_.' + methodName + '` should return unique values of an unsorted array', function(assert) {
24715 QUnit.test('`_.' + methodName + '` should return unique values of a sorted array', function(assert) {
24722 QUnit.test('`_.' + methodName + '` should treat object instances as unique', function(assert) {
24728 QUnit.test('`_.' + methodName + '` should treat `-0` as `0`', function(assert) {
24735 QUnit.test('`_.' + methodName + '` should match `NaN`', function(assert) {
24741 QUnit.test('`_.' + methodName + '` should work with large arrays', function(assert) {
24757 QUnit.test('`_.' + methodName + '` should work with large arrays of `-0` as `0`', function(assert) {
24768 QUnit.test('`_.' + methodName + '` should work with large arrays of boolean, `NaN`, and nullish values', function(assert) {
24784 QUnit.test('`_.' + methodName + '` should work with large arrays of symbols', function(assert) {
24796 QUnit.test('`_.' + methodName + '` should work with large arrays of well-known symbols', function(assert) {
24827 QUnit.test('`_.' + methodName + '` should distinguish between numbers and numeric strings', function(assert) {
24863 lodashStable.each(['uniqBy', 'sortedUniqBy'], function(methodName) {
24864 var func = _[methodName],
24865 isSorted = methodName == 'sortedUniqBy',
24871 QUnit.test('`_.' + methodName + '` should work with an `iteratee`', function(assert) {
24895 QUnit.test('`_.' + methodName + '` should provide correct `iteratee` arguments', function(assert) {
24907 QUnit.test('`_.' + methodName + '` should work with `_.property` shorthands', function(assert) {
24932 QUnit.test('`_.' + methodName + '` should work with ' + key + ' for `iteratee`', function(assert) {
25218 lodashStable.each(['update', 'updateWith'], function(methodName) {
25219 var func = _[methodName],
25222 QUnit.test('`_.' + methodName + '` should invoke `updater` with the value on `path` of `object`', function(assert) {
25272 lodashStable.each(['values', 'valuesIn'], function(methodName) {
25273 var func = _[methodName],
25274 isValues = methodName == 'values';
25276 QUnit.test('`_.' + methodName + '` should get string keyed values of `object`', function(assert) {
25285 QUnit.test('`_.' + methodName + '` should work with an object that has a `length` property', function(assert) {
25294 QUnit.test('`_.' + methodName + '` should ' + (isValues ? 'not ' : '') + 'include inherited string keyed property values', function(assert) {
25308 QUnit.test('`_.' + methodName + '` should work with `arguments` objects', function(assert) {
25555 lodashStable.each(['xor', 'xorBy', 'xorWith'], function(methodName) {
25556 var func = _[methodName];
25558 QUnit.test('`_.' + methodName + '` should return the symmetric difference of two arrays', function(assert) {
25565 QUnit.test('`_.' + methodName + '` should return the symmetric difference of multiple arrays', function(assert) {
25575 QUnit.test('`_.' + methodName + '` should return an empty array when comparing the same array', function(assert) {
25584 QUnit.test('`_.' + methodName + '` should return an array of unique values', function(assert) {
25594 QUnit.test('`_.' + methodName + '` should return a new array when a single array is given', function(assert) {
25601 QUnit.test('`_.' + methodName + '` should ignore individual secondary arguments', function(assert) {
25608 QUnit.test('`_.' + methodName + '` should ignore values that are not arrays or `arguments` objects', function(assert) {
25617 QUnit.test('`_.' + methodName + '` should return a wrapped value when chaining', function(assert) {
25621 var wrapped = _([1, 2, 3])[methodName]([5, 2, 1, 4]);
25629 QUnit.test('`_.' + methodName + '` should work when in a lazy sequence before `head` or `last`', function(assert) {
25634 wrapped = _(array).slice(1)[methodName]([LARGE_ARRAY_SIZE, LARGE_ARRAY_SIZE + 1]);
25636 var actual = lodashStable.map(['head', 'last'], function(methodName) {
25637 return wrapped[methodName]();
25696 lodashStable.each(['zipObject', 'zipObjectDeep'], function(methodName) {
25697 var func = _[methodName],
25699 isDeep = methodName == 'zipObjectDeep';
25701 QUnit.test('`_.' + methodName + '` should zip together key/value arrays into an object', function(assert) {
25708 QUnit.test('`_.' + methodName + '` should ignore extra `values`', function(assert) {
25714 QUnit.test('`_.' + methodName + '` should assign `undefined` values for extra `keys`', function(assert) {
25720 QUnit.test('`_.' + methodName + '` should ' + (isDeep ? '' : 'not ') + 'support deep paths', function(assert) {
25729 QUnit.test('`_.' + methodName + '` should work in a lazy sequence', function(assert) {
25735 actual = _(props)[methodName](values).map(square).filter(isEven).take().value();
25802 lodashStable.each(['unzip', 'zip'], function(methodName, index) {
25803 var func = _[methodName];
25826 QUnit.test('`_.' + methodName + '` should work with ' + key, function(assert) {
25835 QUnit.test('`_.' + methodName + '` should work with tuples of different lengths', function(assert) {
25852 QUnit.test('`_.' + methodName + '` should treat falsey values as empty arrays', function(assert) {
25864 QUnit.test('`_.' + methodName + '` should ignore values that are not arrays or `arguments` objects', function(assert) {
25871 QUnit.test('`_.' + methodName + '` should support consuming its return value', function(assert) {
26409 lodashStable.each(funcs, function(methodName) {
26410 QUnit.test('`_(...).' + methodName + '` should return a new wrapper', function(assert) {
26416 actual = wrapped[methodName]();
26463 lodashStable.each(funcs, function(methodName) {
26464 QUnit.test('`_(...).' + methodName + '` should return a new wrapped value', function(assert) {
26468 var value = methodName == 'split' ? 'abc' : [1, 2, 3],
26470 actual = wrapped[methodName]();
26583 lodashStable.each(funcs, function(methodName) {
26584 QUnit.test('`_(...).' + methodName + '` should return an unwrapped value when implicitly chaining', function(assert) {
26588 var actual = _()[methodName]();
26596 QUnit.test('`_(...).' + methodName + '` should return a wrapped value when explicitly chaining', function(assert) {
26600 var actual = _().chain()[methodName]();
26622 function message(methodName) {
26623 return '`_.' + methodName + '` should work with `arguments` objects';
26663 function message(methodName) {
26664 return '`_.' + methodName + '` should accept falsey primary arguments';
26676 function message(methodName) {
26677 return '`_.' + methodName + '` should accept falsey secondary arguments';
26714 lodashStable.each(stringMethods, function(methodName) {
26715 var func = _[methodName];
26717 QUnit.test('`_.' + methodName + '` should return an empty string for empty values', function(assert) {
26737 var allMethods = lodashStable.reject(_.functions(_).sort(), function(methodName) {
26738 return lodashStable.startsWith(methodName, '_');
26829 lodashStable.each(acceptFalsey, function(methodName) {
26831 func = _[methodName];
26837 if (methodName == 'noConflict') {
26840 else if (methodName == 'pull' || methodName == 'pullAll') {
26843 if (lodashStable.includes(returnArrays, methodName) && methodName != 'sample') {
26844 assert.deepEqual(actual, expected, '_.' + methodName + ' returns an array');
26846 assert.ok(true, '`_.' + methodName + '` accepts falsey arguments');
26850 lodashStable.each(['chain', 'noConflict', 'runInContext'], function(methodName) {
26851 if (!_[methodName]) {
26862 lodashStable.each(returnArrays, function(methodName) {
26864 func = _[methodName];
26866 switch (methodName) {
26876 assert.ok(lodashStable.isArray(actual), '_.' + methodName + ' returns an array');
26878 var isPull = methodName == 'pull' || methodName == 'pullAll';
26879 assert.strictEqual(actual === array, isPull, '_.' + methodName + ' should ' + (isPull ? '' : 'not ') + 'return the given array');
26886 lodashStable.each(rejectFalsey, function(methodName) {
26888 func = _[methodName];
26891 var pass = !index && /^(?:backflow|compose|cond|flow(Right)?|over(?:Every|Some)?)$/.test(methodName);
26897 (!lodashStable.includes(checkFuncs, methodName) || (e.message == FUNC_ERROR_TEXT));
26902 assert.deepEqual(actual, expected, '`_.' + methodName + '` rejects falsey arguments');
26909 lodashStable.each(noBinding, function(methodName) {
26911 func = _[methodName],
26912 isNegate = methodName == 'negate',
26917 assert.strictEqual(wrapper(), expected, '`_.' + methodName + '` can consume a bound function');
26920 assert.strictEqual(wrapper(), expected, '`_.' + methodName + '` can be bound');
26923 assert.strictEqual(object.wrapper(), expected, '`_.' + methodName + '` uses the `this` of its parent object');
26931 assert.ok(lodashStable.every(_.functions(_), function(methodName) {
26932 return methodName.length > 2 || lodashStable.includes(shortNames, methodName);