diff --git a/test/simple/test-event-emitter-method-names.js b/test/simple/test-event-emitter-method-names.js index e7c0f88e7a5..60d16b3977d 100644 --- a/test/simple/test-event-emitter-method-names.js +++ b/test/simple/test-event-emitter-method-names.js @@ -28,5 +28,6 @@ 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); });