Also removes "appEventsCache". (and reduces the reported test memory usage by ~33%) There's no longer any need to remove appEvent listeners in application-instance initializers' `teardown`, as app instances are recreated before each test (in both legacy and ember cli envs)
14 lines
342 B
JavaScript
14 lines
342 B
JavaScript
import Evented from "@ember/object/evented";
|
|
import Service from "@ember/service";
|
|
|
|
export default Service.extend(Evented, {
|
|
init() {
|
|
this._super(...arguments);
|
|
|
|
// A hack because we don't make `current user` properly via container in testing mode
|
|
if (this.currentUser) {
|
|
this.currentUser.appEvents = this;
|
|
}
|
|
},
|
|
});
|