mirror of https://github.com/nodejs/node.git
13 lines
436 B
JavaScript
13 lines
436 B
JavaScript
var common = require('../common');
|
|
var assert = require('assert');
|
|
var events = require('events');
|
|
|
|
var E = events.EventEmitter.prototype;
|
|
assert.equal(E.constructor.name, 'EventEmitter');
|
|
assert.equal(E.on, E.addListener); // Same method.
|
|
Object.getOwnPropertyNames(E).forEach(function(name) {
|
|
if (name === 'constructor' || name === 'on') return;
|
|
if (typeof E[name] !== 'function') return;
|
|
assert.equal(E[name].name, name);
|
|
});
|