vendredi 10 août 2018

How to access Ember Data store when registering test helper? Ember 3.3

I'm using a custom test helper which requires access to the Ember data store, but I don't know how to access it from the given application argument.

export default registerAsyncHelper('myCustomHelper', function(app) {
  console.log(app); // how to access store?
  let store = app.__registry__.registrations['service:store'].prototype;
  store.pushPayload(// json payload);
});

How can I get access to the store when registering a custom helper?




Aucun commentaire:

Enregistrer un commentaire