From ee8848ddb6953eb6f9d0be64b1f54302cba28f84 Mon Sep 17 00:00:00 2001 From: Rodrigo Palma Date: Thu, 1 Dec 2016 11:24:38 -0600 Subject: [PATCH] test: refactor test-event-emitter-method-names Improved test by using strictEqual instead of equal. PR-URL: https://github.com/nodejs/node/pull/10027 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Evan Lucas --- test/parallel/test-event-emitter-method-names.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-event-emitter-method-names.js b/test/parallel/test-event-emitter-method-names.js index c1e6540f01..e268e229b0 100644 --- a/test/parallel/test-event-emitter-method-names.js +++ b/test/parallel/test-event-emitter-method-names.js @@ -4,10 +4,10 @@ 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. +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.equal(E[name].name, name); + assert.strictEqual(E[name].name, name); });