From abb583bc4f26704a0abb2d98598dc196f228c0be Mon Sep 17 00:00:00 2001 From: David Ward Date: Fri, 12 Oct 2018 10:09:09 -0700 Subject: [PATCH] test: fix test-dgram-pingpong assertion arg order PR-URL: https://github.com/nodejs/node/pull/23514 Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat Reviewed-By: Colin Ihrig Reviewed-By: Gireesh Punathil Reviewed-By: Ruben Bridgewater --- test/sequential/test-dgram-pingpong.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/sequential/test-dgram-pingpong.js b/test/sequential/test-dgram-pingpong.js index c97b7872dedf2c..33b01fbe22a9b9 100644 --- a/test/sequential/test-dgram-pingpong.js +++ b/test/sequential/test-dgram-pingpong.js @@ -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();