Skip to content

Commit

Permalink
[major] Remove EventEmitter#setMaxListeners()
Browse files Browse the repository at this point in the history
The method is a noop and documented as not supported.
  • Loading branch information
lpinca committed Nov 29, 2017
1 parent 7bdf8c0 commit 315f5a0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
7 changes: 0 additions & 7 deletions index.js
Expand Up @@ -318,13 +318,6 @@ EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {
EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
EventEmitter.prototype.addListener = EventEmitter.prototype.on;

//
// This function doesn't apply anymore.
//
EventEmitter.prototype.setMaxListeners = function setMaxListeners() {
return this;
};

//
// Expose the prefix.
//
Expand Down
14 changes: 0 additions & 14 deletions test/test.js
Expand Up @@ -639,18 +639,4 @@ describe('EventEmitter', function tests() {
assume(e.eventNames()).eql([s]);
});
});

describe('EventEmitter#setMaxListeners', function () {
it('is a function', function () {
var e = new EventEmitter();

assume(e.setMaxListeners).is.a('function');
});

it('returns self when called', function () {
var e = new EventEmitter();

assume(e.setMaxListeners()).to.equal(e);
});
});
});

0 comments on commit 315f5a0

Please sign in to comment.