How to inject the store into an Ember.Service in unit tests?

Posted by Editorial Staff | Updated on

If you want to inject the store into an Ember.Service in unit tests? In recent versions of Ember you can inject the store as a service, e.g:

It gets the service name from the property name, so if you call it something else you need to specify ‘store’.. e.g:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers