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