Sha256: 0826cf32b3eafbe19706f7d9aba83a3f36a6d1031ef5101a8663d56bc1ddb2e2

Contents?: true

Size: 556 Bytes

Versions: 8

Compression:

Stored size: 556 Bytes

Contents

/* */ 
var assert = require('assert');
var EventEmitter = require('../events').EventEmitter;
var util = require('util');
util.inherits(MyEE, EventEmitter);
function MyEE(cb) {
  this.once(1, cb);
  this.emit(1);
  this.removeAllListeners();
  EventEmitter.call(this);
}
var called = false;
var myee = new MyEE(function() {
  called = true;
});
util.inherits(ErrorEE, EventEmitter);
function ErrorEE() {
  this.emit('error', new Error('blerg'));
}
assert.throws(function() {
  new ErrorEE();
}, /blerg/);
assert(called);
assert.deepEqual(myee._events, {});

Version data entries

8 entries across 8 versions & 1 rubygems

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