Browse Source

test: check that EventEmitter.on == EventEmitter.addListener

v0.7.4-release
Ben Noordhuis 13 years ago
parent
commit
b6a869ef4f
  1. 3
      test/simple/test-event-emitter-add-listeners.js

3
test/simple/test-event-emitter-add-listeners.js

@ -28,6 +28,9 @@ var e = new events.EventEmitter();
var events_new_listener_emited = [];
var times_hello_emited = 0;
// sanity check
assert.equal(e.addListener, e.on);
e.on('newListener', function(event, listener) {
console.log('newListener: ' + event);
events_new_listener_emited.push(event);

Loading…
Cancel
Save