Browse Source

test: EventEmitter#setMaxListeners() returns this

Add a regression test for commit f8d8122.
v0.11.2-release
Sam Roberts 12 years ago
committed by Ben Noordhuis
parent
commit
4c02282c7e
  1. 3
      test/simple/test-event-emitter-check-listener-leaks.js

3
test/simple/test-event-emitter-check-listener-leaks.js

@ -82,3 +82,6 @@ e.on('uno', function() {});
assert.ok(!e._events['uno'].hasOwnProperty('warned')); assert.ok(!e._events['uno'].hasOwnProperty('warned'));
e.on('uno', function() {}); e.on('uno', function() {});
assert.ok(e._events['uno'].hasOwnProperty('warned')); assert.ok(e._events['uno'].hasOwnProperty('warned'));
// chainable
assert.strictEqual(e, e.setMaxListeners(1));

Loading…
Cancel
Save