Sha256: 2eb2cb6490ff852fb24e4810a39f7ebcb04a394bf460703b3500f6b37c6f56a4

Contents?: true

Size: 435 Bytes

Versions: 8

Compression:

Stored size: 435 Bytes

Contents

/* */ 
var assert = require('assert');
var events = require('../events');
var gotEvent = false;
var e = new events.EventEmitter();
e.on('maxListeners', function() {
  gotEvent = true;
});
e.setMaxListeners(42);
assert.throws(function() {
  e.setMaxListeners(NaN);
});
assert.throws(function() {
  e.setMaxListeners(-1);
});
assert.throws(function() {
  e.setMaxListeners("and even this");
});
e.emit('maxListeners');
assert(gotEvent);

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sequenceserver-3.1.3 public/vendor/npm/events@1.0.2/tests/max-listeners.js
sequenceserver-3.1.2 public/vendor/npm/events@1.0.2/tests/max-listeners.js
sequenceserver-3.1.1 public/vendor/npm/events@1.0.2/tests/max-listeners.js
sequenceserver-3.1.0 public/vendor/npm/events@1.0.2/tests/max-listeners.js
sequenceserver-3.0.1 public/vendor/npm/events@1.0.2/tests/max-listeners.js
sequenceserver-3.0 public/vendor/npm/events@1.0.2/tests/max-listeners.js
sequenceserver-2.2.0 public/vendor/npm/events@1.0.2/tests/max-listeners.js
sequenceserver-2.1.0 public/vendor/npm/events@1.0.2/tests/max-listeners.js