Skip to content

Commit

Permalink
test: fix test-dgram-pingpong assertion arg order
Browse files Browse the repository at this point in the history
PR-URL: #23514
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
gendelbendel authored and MylesBorins committed Nov 29, 2018
1 parent 2837664 commit abb583b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/sequential/test-dgram-pingpong.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const dgram = require('dgram');
function pingPongTest(port, host) {

const server = dgram.createSocket('udp4', common.mustCall((msg, rinfo) => {
assert.strictEqual('PING', msg.toString('ascii'));
assert.strictEqual(msg.toString('ascii'), 'PING');
server.send('PONG', 0, 4, rinfo.port, rinfo.address);
}));

Expand All @@ -20,7 +20,7 @@ function pingPongTest(port, host) {
const client = dgram.createSocket('udp4');

client.on('message', function(msg) {
assert.strictEqual('PONG', msg.toString('ascii'));
assert.strictEqual(msg.toString('ascii'), 'PONG');

client.close();
server.close();
Expand Down

0 comments on commit abb583b

Please sign in to comment.