Lines Matching refs:equal

11     assert.equal(bound(), 'name: moe', 'can bind a function to a context');
14 assert.equal(bound(), 'name: moe', 'can do OO-style binding');
23 assert.equal(func('moe'), 'hello: moe', 'the function was partially applied in advance');
26 assert.equal(func(), 'hello: curly', 'the function was completely applied in advance');
30 …assert.equal(func(), 'hello: moe curly', 'the function was partially applied in advance and can ac…
32 func = function(ctx, message) { assert.equal(this, ctx, message); };
43 …assert.equal(newBoundf.hello, void 0, 'function should not be bound to the context, to comply with…
44 …assert.equal(boundf().hello, 'moe curly', "When called without the new operator, it's OK to be bou…
55 assert.equal(obj.func('c', 'd'), 'moe a b c d', 'can partially apply');
58 assert.equal(obj.func('a', 'c'), 'moe a b c d', 'can partially apply with placeholders');
61 assert.equal(func('a', 'c', 'e'), 5, 'accepts more arguments than the number of placeholders');
62 assert.equal(func('a'), 4, 'accepts fewer arguments than the number of placeholders');
65 assert.equal(func('a'), 'undefined', 'unfilled placeholders are undefined');
78 assert.equal(widget.get(), 'foo', 'keeps prototype');
83 assert.equal(func('a'), 4, 'allows the placeholder to be swapped out');
87 assert.equal(func('a'), 5, 'swapping the placeholder preserves previously bound arguments');
102 assert.equal(curly.getName(), 'name: curly', 'unbound function is bound to current object');
103 assert.equal(curly.sayHi(), 'hi: moe', 'bound function is still bound to original object');
119 assert.equal(curly.sayHi(), 'hi: moe');
122 …assert.equal(sayLast(1, 2, 3, 4, 5, 6, 7, 'Tom'), 'hi: moe', 'createCallback works with any number…
126 assert.equal(getName(), 'name: moe', 'flattens arguments into a single list');
133 assert.equal(fib(10), 55, 'a memoized version of fibonacci produces identical results');
135 assert.equal(fib(10), 55, 'a memoized version of fibonacci produces identical results');
141 assert.equal(o('toString'), 'toString', 'checks hasOwnProperty');
142 assert.equal(fastO('toString'), 'toString', 'checks hasOwnProperty');
148 assert.equal(upper('foo'), 'FOO');
149 assert.equal(upper('bar'), 'BAR');
152 assert.equal(upper('foo'), 'BAR');
153 assert.equal(upper('bar'), 'FOO');
203 assert.equal(counter, 1, 'incr was called immediately');
204 _.delay(function(){ assert.equal(counter, 2, 'incr was throttled'); done(); }, 64);
215 assert.equal(value, 1, 'updated to latest value');
216 _.delay(function(){ assert.equal(value, 3, 'updated to latest value'); done(); }, 96);
227 assert.equal(result, 1, 'throttled functions return their value');
228 assert.equal(counter, 1, 'incr was called once'); done();
239 _.delay(function(){ assert.equal(counter, 2, 'incr was called twice'); done(); }, 64);
249 assert.equal(counter, 1);
251 assert.equal(counter, 2);
253 assert.equal(counter, 3);
272 assert.equal(results[0], 1, 'incr was called once');
273 assert.equal(results[1], 1, 'incr was throttled');
274 assert.equal(results[2], 1, 'incr was throttled');
275 assert.equal(results[3], 2, 'incr was called twice');
276 assert.equal(results[4], 2, 'incr was throttled');
277 assert.equal(results[5], 3, 'incr was called trailing');
311 assert.equal(counter, 0);
314 assert.equal(counter, 1);
330 assert.equal(counter, 0);
333 assert.equal(counter, 1);
337 assert.equal(counter, 2);
367 assert.equal(counter, 1);
370 assert.equal(counter, 1);
373 assert.equal(counter, 2);
376 assert.equal(counter, 2);
391 assert.equal(counter, 1);
398 assert.equal(counter, 2);
422 assert.equal(value, 'a1a2');
424 assert.equal(value, 'a1a2c1c2b1b2', 'append was throttled successfully');
439 assert.equal(counter, 2, 'incr was called immediately');
440 _.delay(function(){ assert.equal(counter, 3, 'incr was throttled'); done(); }, 64);
451 assert.equal(counter, 0, 'incr was throttled');
452 _.delay(function(){ assert.equal(counter, 0, 'incr was throttled'); done(); }, 64);
463 _.delay(function(){ assert.equal(counter, 1, 'incr was debounced'); done(); }, 96);
474 _.delay(function(){ assert.equal(counter, 0, 'incr was not called'); done(); }, 96);
486 assert.equal(a, 1);
487 assert.equal(b, 1);
488 assert.equal(counter, 1, 'incr was called immediately');
493 assert.equal(counter, 1, 'incr was debounced');
495 assert.equal(c, 2);
496 assert.equal(counter, 2, 'incr was called again');
511 assert.equal(a, 1);
512 assert.equal(b, 2);
513 assert.equal(counter, 2, 'incr was called immediately');
517 _.delay(function(){ assert.equal(counter, 2, 'incr was debounced'); done(); }, 128);
529 assert.equal(counter, 1, 'incr was called immediately');
530 _.delay(function(){ assert.equal(counter, 1, 'incr was debounced'); done(); }, 96);
543 assert.equal(counter, 1, 'incr was called immediately');
551 assert.equal(counter, 2, 'incr was debounced successfully');
574 assert.equal(value, '');
576 assert.equal(value, 'a1a2b1b2', 'append was debounced successfully');
586 assert.equal(num, 1);
588 assert.equal(increment(), 1, 'stores a memo to the last value');
603 assert.equal(backwards('moe'), 'hi: moe eom', 'wrapped the salutation function');
608 assert.equal(obj.hi(), 'Hello Moe');
618 assert.equal(_.negate(isOdd)(2), true, 'should return the complement of the given function');
619 assert.equal(_.negate(isOdd)(3), false, 'should return the complement of the given function');
626 assert.equal(composed('moe'), 'hi: moe!', 'can compose a function that takes another');
629 assert.equal(composed('moe'), 'hi: moe!', 'in this case, the functions are also commutative');
633 assert.equal(arguments.length, 3, 'First function called with multiple args');
637 assert.equal(arguments.length, 1, 'Composed function is called with 1 argument');
641 assert.equal(arguments.length, 1, 'Composed function is called with 1 argument');
645 assert.equal(composed(1, 2, 3), 12);
658 assert.equal(testAfter(5, 5), 1, 'after(N) should fire after being called N times');
659 assert.equal(testAfter(5, 4), 0, 'after(N) should not fire unless called N times');
660 assert.equal(testAfter(0, 0), 0, 'after(0) should not fire immediately');
661 assert.equal(testAfter(0, 1), 1, 'after(0) should fire when first invoked');
672 assert.equal(testBefore(5, 5), 4, 'before(N) should not fire after being called N times');
673 assert.equal(testBefore(5, 4), 4, 'before(N) should fire before being called N times');
674 assert.equal(testBefore(0, 0), 0, 'before(0) should not fire immediately');
675 assert.equal(testBefore(0, 1), 0, 'before(0) should not fire when first invoked');
680 assert.equal(increment(), 2, 'stores a memo to the last value');
681 assert.equal(context.num, 2, 'provides context');
686 assert.equal(identity, _.identity, '_.iteratee is exposed as an external function.');
692 assert.equal(cb().length, 0);
711 assert.equal(_.every(collection, /b/g), false);
713 assert.equal(_.find(collection, /b/g), 'bar');
714 assert.equal(_.findIndex(collection, /b/g), 1);
715 assert.equal(_.findKey(collection, /b/g), 1);
716 assert.equal(_.findLastIndex(collection, /b/g), 2);
720 assert.equal(_.max(collection, /b/g), 'bbiz');
721 assert.equal(_.min(collection, /b/g), 'foo');
724 assert.equal(_.some(collection, /b/g), true);
726 assert.equal(_.sortedIndex(collection, 'blah', /b/g), 1);