lundi 21 décembre 2015

Get promise is not being met with a Then function

I'm having some issues with my first emberjs application. It is a sample application that contains users and notes for each user that they can update. I'm trying to do unit tests right now, so that I know the format for accessing information from the store, but I'm getting some errors when I try to access the notes from the user model. Here is the code:

testUser.get("notes").then(notes => {
   assert.equal(notes[0], testNote, "Note is valid."); 
});

And here is the error:

testUser.get(...).then is not a function

From what I read on emberjs.com the .get(...) function returns a promise that can then be used with a .then for access different elements in the array. Where am I going wrong?




Aucun commentaire:

Enregistrer un commentaire