mardi 7 mars 2017

How to check properties attribute types in an Ember Model unit test?

I'm trying to write a utility for testing Ember Models. At the moment I have a function which loops through the properties defined in the model (by getting the keys) and matching them with the expected keys.

I'd like to take this one step further and check that the properties have the correct value in the model. I want to be able to check for DS.attr(string/number/date etc) and Computed properties.

How can I do this?




Aucun commentaire:

Enregistrer un commentaire