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 <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
  • Loading branch information
Rodrigo Palma authored and MylesBorins committed Dec 20, 2016
1 parent a2023a9 commit 542b40f
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 542b40f

Please sign in to comment.