Skip to content

Commit

Permalink
test: fix order of parameters to assert.strictEqual
Browse files Browse the repository at this point in the history
Usage of assert.strictEqual in test-net-server-listen-remove-callback.js
incorrectly passes the expected value as the first argument
and actual value as the second argument.

This should be reversed, per the assert documentation.

Refs: https://nodejs.org/api/assert.html#assert_assert_strictequal_actual_expected_message
  • Loading branch information
jasonnutter committed Oct 14, 2018
1 parent bcbb937 commit e8e5ea3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/parallel/test-net-server-listen-remove-callback.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const server = net.createServer();
server.on('close', function() {
const listeners = server.listeners('listening');
console.log('Closed, listeners:', listeners.length);
assert.strictEqual(0, listeners.length);
assert.strictEqual(listeners.length, 0);
});

server.listen(0, function() {
Expand Down

0 comments on commit e8e5ea3

Please sign in to comment.