blob: e268e229b06b5bae389103f58a1eec1707603ab5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
'use strict';
require('../common');
var assert = require('assert');
var events = require('events');
var E = events.EventEmitter.prototype;
assert.strictEqual(E.constructor.name, 'EventEmitter');
assert.strictEqual(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.strictEqual(E[name].name, name);
});
|