You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
I am trying to remove an event listener during the emit cycle of an event. I would have thought the following code would not fail. Am I right in this assumption or should all of these event listeners be called?
varemitter=newEventEmitter();t.plan(2);functionone(){t.ok('called');emitter.removeListener('test',two);};functiontwo(){t.fail('should not be called');};functionthree(){t.ok('called');};emitter.on('test',one);emitter.on('test',two);emitter.on('test',three);emitter.emit('test');