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
I would expect this listener to run only once, but it isn't removed after fired:
var type = 'test1.foo.bar';
var type2 = 'test1.foo.*';
var functionA = function() { test.ok(true, 'Event was fired'); };
emitter.once(type2, functionA);
emitter.emit(type);
emitter.emit(type);
test.expect(1);
I would expect this listener to run only once, but it isn't removed after fired:
This case is very similar to to unit test number 7 here: https://github.com/hij1nx/EventEmitter2/blob/master/test/wildcardEvents/ttl.js but the type and type2 are interchanged.
Is this behaviour intentional?
The text was updated successfully, but these errors were encountered: