mercredi 17 août 2016

Ember.getOwner for service lookup in integration tests

I have some Ember integration tests where I need to access the store. I have been using:

Ember.getOwner(this).lookup("service:store");

This works fine but I was wondering if there is a better way to get at the store in integration tests. In ember unit tests, using ember-qunit and moduleForModel, the store can be accessed easily with:

this.store();

The current docs around integration testing mention stubbing and registering services, but there is no explicit mention of the accessing the store.

What is the proper way to access and interact with the store in the context of an integration test with model dependencies?




Aucun commentaire:

Enregistrer un commentaire