From 7a280705bdf0460666cd58530c955ef384ac8102 Mon Sep 17 00:00:00 2001 From: "Illescas, Ricardo" Date: Fri, 12 Oct 2018 11:19:56 -0600 Subject: [PATCH 1/4] test: fix argument order in assertions --- test/pummel/test-net-timeout.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/pummel/test-net-timeout.js b/test/pummel/test-net-timeout.js index 89190f8d282d50..e87cdc0b8edf51 100644 --- a/test/pummel/test-net-timeout.js +++ b/test/pummel/test-net-timeout.js @@ -66,7 +66,7 @@ echo_server.listen(common.PORT, function() { }); client.on('data', function(chunk) { - assert.strictEqual('hello\r\n', chunk); + assert.strictEqual(chunk, 'hello\r\n'); if (exchanges++ < 5) { setTimeout(function() { console.log('client write "hello"'); From 116134ffeb76072302076a89edf8a812c77c2531 Mon Sep 17 00:00:00 2001 From: "Illescas, Ricardo" Date: Fri, 12 Oct 2018 12:15:43 -0600 Subject: [PATCH 2/4] test: Fixes argument order in assertion. --- test/known_issues/test-http-path-contains-unicode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/known_issues/test-http-path-contains-unicode.js b/test/known_issues/test-http-path-contains-unicode.js index 4d50c8865ba542..a51b07210214b9 100644 --- a/test/known_issues/test-http-path-contains-unicode.js +++ b/test/known_issues/test-http-path-contains-unicode.js @@ -10,7 +10,7 @@ const http = require('http'); const expected = '/café🐶'; -assert.strictEqual('/caf\u{e9}\u{1f436}', expected); +assert.strictEqual(expected, '/caf\u{e9}\u{1f436}'); const server = http.createServer(common.mustCall(function(req, res) { assert.strictEqual(req.url, expected); From 04ec3198d6ff00bbb5de888100fc8b7bfd6f9604 Mon Sep 17 00:00:00 2001 From: "Illescas, Ricardo" Date: Fri, 12 Oct 2018 12:17:03 -0600 Subject: [PATCH 3/4] Revert "test: Fixes argument order in assertion." This reverts commit 116134ffeb76072302076a89edf8a812c77c2531. --- test/known_issues/test-http-path-contains-unicode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/known_issues/test-http-path-contains-unicode.js b/test/known_issues/test-http-path-contains-unicode.js index a51b07210214b9..4d50c8865ba542 100644 --- a/test/known_issues/test-http-path-contains-unicode.js +++ b/test/known_issues/test-http-path-contains-unicode.js @@ -10,7 +10,7 @@ const http = require('http'); const expected = '/café🐶'; -assert.strictEqual(expected, '/caf\u{e9}\u{1f436}'); +assert.strictEqual('/caf\u{e9}\u{1f436}', expected); const server = http.createServer(common.mustCall(function(req, res) { assert.strictEqual(req.url, expected); From d96f466c7c5723fe976988db8e190cd66cd4d6fc Mon Sep 17 00:00:00 2001 From: "Illescas, Ricardo" Date: Fri, 12 Oct 2018 12:27:34 -0600 Subject: [PATCH 4/4] test: Changes the order of the assertion parameters in test/parallel/test-child-process-ilc, so the first argument is the value and the second argument is the expected value as assertion documentation expects. --- test/parallel/test-child-process-ipc.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-child-process-ipc.js b/test/parallel/test-child-process-ipc.js index 36293cb73c1a7d..f1652a91e6968e 100644 --- a/test/parallel/test-child-process-ipc.js +++ b/test/parallel/test-child-process-ipc.js @@ -44,13 +44,13 @@ child.stdout.on('data', function(data) { console.log(`child said: ${JSON.stringify(data)}`); if (!gotHelloWorld) { console.error('testing for hello world'); - assert.strictEqual('hello world\r\n', data); + assert.strictEqual(data, 'hello world\r\n'); gotHelloWorld = true; console.error('writing echo me'); child.stdin.write('echo me\r\n'); } else { console.error('testing for echo me'); - assert.strictEqual('echo me\r\n', data); + assert.strictEqual(data, 'echo me\r\n'); gotEcho = true; child.stdin.end(); }