Skip to content

Commit

Permalink
test: refactor test-event-emitter-method-names
Browse files Browse the repository at this point in the history
Improved test by using strictEqual instead of equal.

PR-URL: #10027
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
  • Loading branch information
Rodrigo Palma authored and MylesBorins committed Dec 21, 2016
1 parent baceb97 commit ea0d308
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/parallel/test-event-emitter-method-names.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});

0 comments on commit ea0d308

Please sign in to comment.