test: EventEmitter#setMaxListeners() returns this

Add a regression test for commit f8d8122.
pull/5010/head
Sam Roberts 2013-05-02 16:38:16 -07:00 committed by Ben Noordhuis
parent f8d81222e8
commit 4c02282c7e
1 changed files with 3 additions and 0 deletions

View File

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