Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property description must be an object: 2 #251

Closed
broerse opened this issue Aug 16, 2018 · 0 comments · Fixed by #253
Closed

Property description must be an object: 2 #251

broerse opened this issue Aug 16, 2018 · 0 comments · Fixed by #253

Comments

@broerse
Copy link
Collaborator

broerse commented Aug 16, 2018

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.

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant