vendredi 24 juin 2016

Ember.js: How to assert event unbound in component test?

In component code like:

didInsertElement() {
  this.$('.something').on(//...);
},
willDestroyElement() {
  this.$('.something').off(//...);
}

You have the method of querying for events $._data(this.$('.something')[0], 'events'), but when destroyed, the element is gone. Is there a way to assert in test that the event was actually unbound before destroyed?




Aucun commentaire:

Enregistrer un commentaire