Inject real service in Ember.js test
There is no straightforward howto on injecting real services in Ember components/controllers/routes when you test them, instead of mocking them.
Well. I just do this dirty thing:
`import startApp from 'listly/tests/helpers/start-app'`
...
App = startApp();
realExceptionService = App.__container__.lookup('service:servicename');
Written by Esteban
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ember.js
Authors
ryrych
11.71K
michalbryxi
6.718K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#