From 8d876a60db3d881e8f56654a998fbe3dee62603a 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 c1e6540f0184af..e268e229b06b5b 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); });