mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
436 B
13 lines
436 B
11 years ago
|
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;
|
||
11 years ago
|
if (typeof E[name] !== 'function') return;
|
||
11 years ago
|
assert.equal(E[name].name, name);
|
||
|
});
|