From 4c02282c7e9bd549267987d9961bd4e63444181e Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Thu, 2 May 2013 16:38:16 -0700 Subject: [PATCH] test: EventEmitter#setMaxListeners() returns this Add a regression test for commit f8d8122. --- test/simple/test-event-emitter-check-listener-leaks.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/simple/test-event-emitter-check-listener-leaks.js b/test/simple/test-event-emitter-check-listener-leaks.js index 3d45e01c72..d073e5de13 100644 --- a/test/simple/test-event-emitter-check-listener-leaks.js +++ b/test/simple/test-event-emitter-check-listener-leaks.js @@ -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));