mirror of https://github.com/nodejs/node.git
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
parent
8c86463d9f
commit
3a62c06067
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue