This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Description
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?
var emitter = new EventEmitter();
t.plan(2);
function one () {
t.ok('called');
emitter.removeListener('test', two);
};
function two () {
t.fail('should not be called');
};
function three () {
t.ok('called');
};
emitter.on('test', one);
emitter.on('test', two);
emitter.on('test', three);
emitter.emit('test');