Closed broerse closed 6 years ago
The fowing test gives Property description must be an object: 2 on assert.deepEqual(toArray(object.get('infiniteContent')),[1,2]); as far as I can see.
Property description must be an object: 2
assert.deepEqual(toArray(object.get('infiniteContent')),[1,2]);
test("infinite smoke", function(assert) { var Something = Ember.Object.extend({ pagedContent: pagedArray("content", {perPage: 2}), infiniteContent: pagedArray("pagedContent", {infinite: true}) }); var object = Something.create({content: Ember.A([1,2,3,4,5])}); assert.deepEqual(toArray(object.get('infiniteContent')),[1,2]); object.get('infiniteContent').loadNextPage(); assert.deepEqual(toArray(object.get('infiniteContent')),[1,2,3,4]); });
The folowing code works:
test("infinite smoke", function(assert) { var Something = Ember.Object.extend({ infiniteContent: pagedArray("content", {infinite: {source: "unpaged"}, perPage: 2}) }); var object = Something.create({content: Ember.A([1,2,3,4,5])}); assert.deepEqual(toArray(object.get('infiniteContent')),[1,2]); object.get('infiniteContent').loadNextPage(); assert.deepEqual(toArray(object.get('infiniteContent')),[1,2,3,4]); });
How can we fix this?
The fowing test gives
Property description must be an object: 2
onassert.deepEqual(toArray(object.get('infiniteContent')),[1,2]);
as far as I can see.The folowing code works:
How can we fix this?