0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Removed unused onMany method from events

- Preparing to cleanup / change how we use events across Ghost
- Removing this unused bit of additional complexity makes it easier to reason about what we need
This commit is contained in:
Hannah Wolfe 2021-05-04 11:40:32 +01:00
parent 273e220327
commit 3eec28afcf
2 changed files with 0 additions and 12 deletions

View file

@ -9,12 +9,6 @@ EventRegistry = function () {
util.inherits(EventRegistry, events.EventEmitter);
EventRegistry.prototype.onMany = function (arr, onEvent) {
arr.forEach((eventName) => {
this.on(eventName, onEvent);
});
};
EventRegistryInstance = new EventRegistry();
EventRegistryInstance.setMaxListeners(100);

View file

@ -39,12 +39,6 @@ describe.skip('Scheduling: Post Scheduling', function () {
return Promise.resolve({posts: scope.scheduledPosts});
});
sinon.stub(events, 'onMany').callsFake(function (stubedEvents, stubDone) {
stubedEvents.forEach(function (event) {
scope.events[event] = stubDone;
});
});
sinon.stub(schedulingUtils, 'createAdapter').returns(Promise.resolve(scope.adapter));
sinon.stub(models.Client, 'findOne').callsFake(function () {