test: fix test-dgram-pingpong assertion arg order

PR-URL: https://github.com/nodejs/node/pull/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>
pull/23548/merge
David Ward 2018-10-12 10:09:09 -07:00 committed by Ruben Bridgewater
parent 8c86463d9f
commit 3a62c06067
No known key found for this signature in database
GPG Key ID: F07496B3EB3C1762
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}));
@ -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();