Lines Matching refs:equal

28     assert.equal(counter, 1);
32 assert.equal(counter, 2);
34 assert.equal(col.length, 4);
80 assert.equal(col.get(0), d);
81 assert.equal(col.get(d.clone()), d);
82 assert.equal(col.get(2), b);
83 assert.equal(col.get({id: 1}), c);
84 assert.equal(col.get(c.clone()), c);
85 assert.equal(col.get(col.first().cid), col.first());
93 assert.equal(collection.get(100), model);
94 assert.equal(collection.get(model.cid), model);
95 assert.equal(collection.get(model), model);
96 assert.equal(collection.get(101), void 0);
101 assert.equal(collection2.get(model.clone()), collection2.first());
132 assert.equal(one.get('name'), 'one');
135 assert.equal(collection.get(0), null);
136 assert.equal(collection.get(101).get('name'), 'dalmatians');
141 assert.equal(col.at(2), c);
142 assert.equal(col.at(-2), c);
147 assert.equal(col.pluck('label').join(' '), 'a b c d');
164 assert.equal(added, 'e');
165 assert.equal(col.length, 5);
166 assert.equal(col.last(), e);
167 assert.equal(otherCol.length, 1);
168 assert.equal(secondAdded, null);
175 assert.equal(atCol.length, 3);
177 assert.equal(atCol.length, 4);
178 assert.equal(atCol.at(1), e);
179 assert.equal(atCol.last(), h);
187 assert.equal(coll.length, 5);
188 assert.equal(addCount, 3);
190 assert.equal(coll.length, 9);
191 assert.equal(addCount, 7);
199 assert.equal(collection.at(i).get('at'), i);
214 assert.equal(collection.pluck('id').join(' '), '3 1 2');
222 assert.equal(collection.pluck('id').join(' '), '2 3 1');
227 assert.equal(collection.pluck('id').join(' '), '1 2 3');
235 assert.equal(collection.length, 1);
243 assert.equal(collection.first().get('name'), 'Moe');
245 assert.equal(collection.first().get('name'), 'Moses');
247 assert.equal(collection.first().get('name'), 'Tim');
256 assert.equal(m, model);
258 assert.equal(collection, col2);
260 assert.equal(collection, col1);
265 assert.equal(m, model);
266 assert.equal(col1, collection);
270 assert.equal(m, model);
271 assert.equal(col2, collection);
274 assert.equal(m.collection, col1);
276 assert.equal(m.collection, col1);
291 assert.equal(collection.at(0).get('value'), 2);
304 assert.equal(collection.first().get('name'), 'Alf');
319 assert.equal(collection.indexOf(rob), 0);
320 assert.equal(collection.indexOf(tim), 1);
321 assert.equal(collection.indexOf(tom), 2);
348 assert.equal(options.index, 3);
349 … assert.equal(collection.get(model), undefined, '#3693: model cannot be fetched from collection');
352 assert.equal(removed, 'd');
357 assert.equal(col.length, 3);
358 assert.equal(col.first(), a);
361 assert.equal(result.length, 1, 'only returns removed models');
362 assert.equal(result[0], c, 'only returns removed models');
364 assert.equal(result.length, 1, 'only returns removed models');
365 assert.equal(result[0], b, 'only returns removed models');
381 assert.equal(list.length, 2);
383 assert.equal(list[1], collection.last());
384 assert.equal(list[1].get('id'), 4);
387 assert.equal(collection.length, 3);
388 assert.equal(list[0], false);
389 assert.equal(list[1].get('id'), 6);
392 assert.equal(result.cid, list[1].cid);
395 assert.equal(collection.length, 2);
396 assert.equal(result.id, 6);
399 assert.equal(collection.length, 1);
400 assert.equal(list[0].get('id'), 2);
401 assert.equal(list[1], null);
407 assert.equal(collection.shift().get('a'), 'a');
408 assert.equal(collection.pop().get('c'), 'c');
415 assert.equal(array.length, 2);
416 assert.equal(array[0].get('b'), 'b');
426 assert.equal(counter, 1);
428 assert.equal(dj.collection, undefined);
430 assert.equal(counter, 1);
451 assert.equal(passed, false);
455 assert.equal(passed, true);
464 assert.equal(m, model);
466 assert.equal(collection, col1);
468 assert.equal(collection, col2);
473 assert.equal(m, model);
474 assert.equal(col1, collection);
478 assert.equal(m, model);
479 assert.equal(col2, collection);
481 assert.equal(col1, m.collection);
485 assert.equal(counter, 1);
486 assert.equal(col1, m.collection);
488 assert.equal(null, m.collection);
490 assert.equal(counter, 2);
502 assert.equal(undefined, m.collection);
514 assert.equal(undefined, m.collection);
522 assert.equal(this.syncArgs.method, 'read');
523 assert.equal(this.syncArgs.model, collection);
524 assert.equal(this.syncArgs.options.parse, true);
527 assert.equal(this.syncArgs.options.parse, false);
547 assert.equal(this, obj);
567 assert.equal(counter, 1);
575 assert.equal(this.syncArgs.method, 'create');
576 assert.equal(this.syncArgs.model, model);
577 assert.equal(model.get('label'), 'f');
578 assert.equal(model.collection, collection);
593 assert.equal(error, 'fail');
594 assert.equal(options.validationError, 'fail');
596 assert.equal(collection.create({foo: 'bar'}, {validate: true}), false);
649 assert.equal(m.validationError, 'fail');
650 assert.equal(collection.length, 1);
661 assert.equal(coll.one, 1);
672 assert.equal(coll.one, 1);
686 assert.equal(coll.model, FooModel);
691 …assert.equal(JSON.stringify(col), '[{"id":3,"label":"a"},{"id":2,"label":"b"},{"id":1,"label":"c"}…
704 assert.equal(coll.where({a: 1}).length, 3);
705 assert.equal(coll.where({a: 2}).length, 1);
706 assert.equal(coll.where({a: 3}).length, 1);
707 assert.equal(coll.where({b: 1}).length, 0);
708 assert.equal(coll.where({b: 2}).length, 2);
709 assert.equal(coll.where({a: 1, b: 2}).length, 1);
710 assert.equal(coll.findWhere({a: 1}), model);
711 assert.equal(coll.findWhere({a: 4}), void 0);
716 assert.equal(col.map(function(model){ return model.get('label'); }).join(' '), 'a b c d');
717 assert.equal(col.some(function(model){ return model.id === 100; }), false);
718 assert.equal(col.some(function(model){ return model.id === 0; }), true);
719 assert.equal(col.reduce(function(m1, m2) {return m1.id > m2.id ? m1 : m2;}).id, 3);
720 assert.equal(col.reduceRight(function(m1, m2) {return m1.id > m2.id ? m1 : m2;}).id, 3);
721 assert.equal(col.indexOf(b), 1);
722 assert.equal(col.size(), 4);
723 assert.equal(col.rest().length, 3);
730 assert.equal(wrapped.map('id').max().value(), 3);
731 assert.equal(wrapped.map('id').min().value(), 0);
756 assert.equal(coll.find({a: 0}), undefined);
758 assert.equal(coll.find('d'), undefined);
760 assert.equal(coll.filter({a: 0}), false);
762 assert.equal(coll.some({a: 0}), false);
763 assert.equal(coll.some({a: 1}), true);
764 assert.equal(coll.reject({a: 0}).length, 4);
766 assert.equal(coll.every({a: 0}), false);
767 assert.equal(coll.every({b: 1}), true);
778 assert.equal(coll.findIndex({b: 1}), 0);
779 assert.equal(coll.findIndex({b: 9}), -1);
780 assert.equal(coll.findLastIndex({b: 1}), 3);
781 assert.equal(coll.findLastIndex({b: 9}), -1);
791 assert.equal(resetCount, 1);
792 assert.equal(col.length, 0);
793 assert.equal(col.last(), null);
795 assert.equal(resetCount, 2);
796 assert.equal(col.length, 4);
797 assert.equal(col.last(), d);
799 assert.equal(resetCount, 3);
800 assert.equal(col.length, 4);
804 assert.equal(col.length, 0);
805 assert.equal(resetCount, 4);
809 assert.equal(col.length, 2);
810 assert.equal(resetCount, 5);
813 assert.equal(col.length, 4);
814 assert.equal(resetCount, 6);
820 assert.equal(collection.get(1).get('a'), 1);
827 assert.equal(collection.get(1), model);
839 assert.equal(collection.length, 2);
841 assert.equal(model.modelParameter, 'model parameter');
850 assert.equal(origOpts.previousModels, undefined);
851 assert.equal(opts.previousModels[0].id, 1);
861 assert.equal(fired, true);
869 assert.equal(models.length, 1);
879 assert.equal(attrs.prop, 'value');
880 assert.equal(this.collection, collection);
893 assert.equal(collection.length, 6);
895 assert.equal(collection.length, 0);
930 assert.equal(collection.length, 1);
938 assert.equal(collection.length, 1);
940 assert.equal(collection.length, 2);
941 assert.equal(collection.last().id, 1);
1038 assert.equal(this, obj);
1151 assert.equal(collection.length, 2);
1152 assert.equal(collection.at(0).get('name'), 'test');
1174 assert.equal(collection.length, 2);
1175 assert.equal(collection.at(0).get('name'), 'test');
1248 assert.equal(collection.length, 2);
1250 assert.equal(collection.length, 1);
1252 assert.equal(collection.length, 2);
1266 assert.equal(collection.length, 2);
1268 assert.equal(collection.length, 1);
1270 assert.equal(collection.length, 2);
1281 assert.equal(collection.first().get('key'), 'value');
1284 assert.equal(collection.first().get('key'), 'other');
1287 assert.equal(collection.first().get('key'), 'other');
1288 assert.equal(collection.length, 1);
1302 assert.equal(collection.first().id, 1);
1304 assert.equal(collection.first().id, 1);
1321 assert.equal(collection.first(), model);
1328 assert.equal(data.parsed, void 0);
1378 assert.equal(collection.first().get('a'), 1);
1508 assert.equal(collection.length, 2);
1592 assert.equal(job.get('name'), 'JobName');
1593 assert.equal(job.items.at(0).get('name'), 'Sub1');
1594 assert.equal(job.items.length, 2);
1595 assert.equal(job.items.get(1).subItems.get(1).get('subName'), 'One');
1596 assert.equal(job.items.get(2).subItems.get(3).get('subName'), 'Three');
1598 assert.equal(job.get('name'), 'NewJobName');
1599 assert.equal(job.items.at(0).get('name'), 'NewSub1');
1600 assert.equal(job.items.length, 2);
1601 assert.equal(job.items.get(1).subItems.get(1).get('subName'), 'NewOne');
1602 assert.equal(job.items.get(2).subItems.get(3).get('subName'), 'NewThree');
1615 assert.equal(model, this._byId[model.id]);
1616 assert.equal(model, this._byId[model.cid]);
1617 assert.equal(model._events.all.length, 1);
1623 assert.equal(this._byId[model.id], void 0);
1624 assert.equal(this._byId[model.cid], void 0);
1625 assert.equal(model.collection, void 0);
1634 assert.equal(calls.add, 1);
1635 assert.equal(calls.remove, 1);
1642 assert.equal(collection.length, 1);
1643 assert.equal(collection.models.length, 1);
1646 assert.equal(collection.length, 1);
1647 assert.equal(collection.models.length, 1);
1663 assert.equal(this.collection, collection);
1673 assert.equal(StoogeCollection.prototype.modelId({id: 1}), 1);
1675 assert.equal(StoogeCollection.prototype.modelId({_id: 1}), 1);
1687 assert.equal(collection.length, 2);
1689 assert.equal(collection.at(0).id, 1);
1691 assert.equal(collection.at(1).id, 2);
1707 assert.equal(collection.length, 2);
1709 assert.equal(collection.at(0), collection.get(1));
1711 assert.equal(collection.at(1), collection.get(2));
1723 assert.equal(collection.length, 2);
1725 assert.equal(collection.at(0), collection.get('a-1'));
1727 assert.equal(collection.at(1), collection.get('b-1'));
1739 assert.equal(c1.get(1).id, 1);
1740 assert.equal(c1.modelId({id: 1}), 1);
1753 assert.equal(c2.get(1), void 0);
1754 assert.equal(c2.modelId(c2.at(0).attributes), void 0);
1757 assert.equal(c2.get(2), void 0);
1758 assert.equal(c2.modelId(m.attributes), void 0);
1765 assert.equal(model.get('val'), options.index);
1775 assert.equal(undefined, options.index);
1822 assert.equal(collection.pluck('id').join(','), '0.5,1,2,2.5,3');
1863 assert.equal(options.changes.added.length, 0);
1864 assert.equal(options.changes.removed.length, 0);
1865 assert.equal(options.changes.merged.length, 2);
1874 assert.equal(x, 1);
1875 assert.equal(y, 2);
1876 assert.equal(z, 3);
1891 assert.equal(m, undefined);
1901 assert.equal(collection.length, 0);
1962 assert.equal(changed.added.length, 2);
1963 assert.equal(changed.merged.length, 0);
2020 assert.equal(fired, false);