Lines Matching refs:equal

8       assert.equal(num, i + 1, 'each iterators provide value and iteration count');
31 assert.equal(count, 3, 'the fun should be called only 3 times');
39 assert.equal(answers, 0, 'handles a null properly');
55 assert.equal(this, context);
123 assert.equal(answers, 100, method + ' enumerates [0, length)');
130 assert.equal(count, 3, method + ' is resistant to length changes');
140 assert.equal(count, 2, method + ' is resistant to property changes');
176 assert.equal(sum, 6, 'can sum up an array');
180 assert.equal(sum, 18, 'can reduce with a context object');
183 assert.equal(sum, 6, 'OO-style reduce');
186 assert.equal(sum, 6, 'default initial value');
189 assert.equal(prod, 24, 'can reduce via multiplication');
192 assert.equal(_.reduce([], _.noop, void 0), void 0, 'undefined can be passed as a special case');
193 …assert.equal(_.reduce([_], _.noop), _, 'collection of length one with no initial value returns the…
194 …assert.equal(_.reduce([], _.noop), void 0, 'returns undefined when collection is empty and no init…
207 assert.equal(list, 'bazbarfoo', 'can perform right folds');
210 assert.equal(list, 'bazbarfoo', 'default initial value');
213 assert.equal(sum, 6, 'default initial value on object');
216 …assert.equal(_.reduceRight([_], _.noop), _, 'collection of length one with no initial value return…
218 …assert.equal(_.reduceRight([], _.noop, void 0), void 0, 'undefined can be passed as a special case…
219 …assert.equal(_.reduceRight([], _.noop), void 0, 'returns undefined when collection is empty and no…
275 assert.equal(result, 2, 'found the first "2" and broke the loop');
291 assert.equal(key, 0);
311 assert.equal(this, evenObject, 'given context');
333 assert.equal(context, 'obj');
490 assert.equal(s.call(), 42, 'call function exists');
495 assert.equal(s.call, void 0, 'call function removed');
509 assert.equal(result.length, 3);
510 assert.equal(result[result.length - 1].b, 4);
512 assert.equal(result.length, 2);
513 assert.equal(result[0].a, 1);
515 assert.equal(result.length, list.length);
537 assert.equal(_.findWhere([_, {a: 1, b: 2}, _], test), _, 'checks properties given function');
548 assert.equal(-Infinity, _.max(null), 'can handle null/undefined');
549 assert.equal(-Infinity, _.max(void 0), 'can handle null/undefined');
550 assert.equal(-Infinity, _.max(null, _.identity), 'can handle null/undefined');
552 assert.equal(_.max([1, 2, 3]), 3, 'can perform a regular Math.max');
555 assert.equal(neg, 1, 'can perform a computation-based max');
557 assert.equal(-Infinity, _.max({}), 'Maximum value of an empty object');
558 assert.equal(-Infinity, _.max([]), 'Maximum value of an empty array');
559 assert.equal(_.max({a: 'a'}), -Infinity, 'Maximum value of a non-numeric collection');
561 assert.equal(_.max(_.range(1, 300000)), 299999, 'Maximum value of a too-big array');
563 …assert.equal(_.max([1, 2, 3, 'test']), 3, 'Finds correct max in array starting with num and contai…
564 assert.equal(_.max(['test', 1, 2, 3]), 3, 'Finds correct max in array starting with NaN');
566 …assert.equal(_.max([1, 2, 3, null]), 3, 'Finds correct max in array starting with num and containi…
567 assert.equal(_.max([null, 1, 2, 3]), 3, 'Finds correct max in array starting with a `null`');
569 …assert.equal(_.max([1, 2, 3, '']), 3, 'Finds correct max in array starting with num and containing…
570 … assert.equal(_.max(['', 1, 2, 3]), 3, 'Finds correct max in array starting with an empty string');
572 …assert.equal(_.max([1, 2, 3, false]), 3, 'Finds correct max in array starting with num and contain…
573 assert.equal(_.max([false, 1, 2, 3]), 3, 'Finds correct max in array starting with a false');
575 assert.equal(_.max([0, 1, 2, 3, 4]), 4, 'Finds correct max in array containing a zero');
576 … assert.equal(_.max([-3, -2, -1, 0]), 0, 'Finds correct max in array containing negative numbers');
583 assert.equal(_.max([a, b], iterator), a, 'Respects iterator return value of -Infinity');
593 assert.equal(_.min(null), Infinity, 'can handle null/undefined');
594 assert.equal(_.min(void 0), Infinity, 'can handle null/undefined');
595 assert.equal(_.min(null, _.identity), Infinity, 'can handle null/undefined');
597 assert.equal(_.min([1, 2, 3]), 1, 'can perform a regular Math.min');
600 assert.equal(neg, 3, 'can perform a computation-based min');
602 assert.equal(_.min({}), Infinity, 'Minimum value of an empty object');
603 assert.equal(_.min([]), Infinity, 'Minimum value of an empty array');
604 assert.equal(_.min({a: 'a'}), Infinity, 'Minimum value of a non-numeric collection');
610 assert.equal(_.min([now, then]), then);
612 assert.equal(_.min(_.range(1, 300000)), 1, 'Minimum value of a too-big array');
614 …assert.equal(_.min([1, 2, 3, 'test']), 1, 'Finds correct min in array starting with num and contai…
615 assert.equal(_.min(['test', 1, 2, 3]), 1, 'Finds correct min in array starting with NaN');
617 …assert.equal(_.min([1, 2, 3, null]), 1, 'Finds correct min in array starting with num and containi…
618 assert.equal(_.min([null, 1, 2, 3]), 1, 'Finds correct min in array starting with a `null`');
620 assert.equal(_.min([0, 1, 2, 3, 4]), 0, 'Finds correct min in array containing a zero');
621 …assert.equal(_.min([-3, -2, -1, 0]), -3, 'Finds correct min in array containing negative numbers');
626 assert.equal(_.min([a, b], iterator), a, 'Respects iterator return value of Infinity');
700 assert.equal(grouped.constructor.length, 1);
701 assert.equal(grouped.hasOwnProperty.length, 2);
708 assert.equal(grouped['1'].length, 2);
709 assert.equal(grouped['3'].length, 1);
722 assert.equal(parity['true'], 4);
723 assert.equal(parity['false'], 5);
727 assert.equal(grouped['3'], 'ten');
728 assert.equal(grouped['4'], 'nine');
729 assert.equal(grouped['5'], 'eight');
733 assert.equal(grouped['1'], 1);
734 assert.equal(grouped['2'], 2);
735 assert.equal(grouped['3'], 3);
740 assert.equal(parity['true'], 2);
741 assert.equal(parity['false'], 3);
745 assert.equal(grouped['3'], 4);
746 assert.equal(grouped['4'], 3);
747 assert.equal(grouped['5'], 3);
755 assert.equal(grouped.constructor, 1);
756 assert.equal(grouped.hasOwnProperty, 2);
763 assert.equal(grouped['1'], 2);
764 assert.equal(grouped['3'], 1);
776 assert.equal(shuffled.length, 4);
826 assert.equal(_.size({one: 1, two: 2, three: 3}), 3, 'can compute the size of an object');
827 assert.equal(_.size([1, 2, 3]), 3, 'can compute the size of an array');
828 assert.equal(_.size({length: 3, 0: 0, 1: 0, 2: 0}), 3, 'can compute the size of Array-likes');
834 assert.equal(func(1, 2, 3, 4), 4, 'can test the size of the arguments object');
836 assert.equal(_.size('hello'), 5, 'can compute the size of a string literal');
837 assert.equal(_.size(new String('hello')), 5, 'can compute the size of string object');
839 assert.equal(_.size(null), 0, 'handles nulls');
840 assert.equal(_.size(0), 0, 'handles numbers');
867 assert.equal(val, 1);
868 assert.equal(key, 'a');
869 assert.equal(obj, object);
870 assert.equal(this, predicate);
880 assert.equal(elementChildren.length, 2);
891 assert.equal(_.max(parent.childNodes, compareNode), _.last(parent.childNodes));
892 assert.equal(_.min(parent.childNodes, compareNode), _.first(parent.childNodes));