Reputation: 1013
It appears from the API that services in Ember extends the main Ember object base class, which implements the observable class, but when I define a property in my Ember service with .property
, my tests fail with undefined is not a function
.
Upvotes: 1
Views: 273
Reputation: 1013
It turns out that, yes, Ember services can have computed properties, and that this bug came from something else. In my tests I was calling service.numberOfThings()
and after appending .property()
to numberOfThings: function(){...}
I needed to change the test code to service.get('numberOfThings');
Upvotes: 1