vendredi 15 juillet 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? Is there a way to query for all events on the page then somehow filter for the one in question?

Aucun commentaire:

Enregistrer un commentaire