From 5790a476986ed5a4c6722a841fb4b2d2ad694a1e Mon Sep 17 00:00:00 2001 From: Yomar Date: Fri, 21 Jun 2019 15:43:51 -0500 Subject: [PATCH 1/2] Switch the argument order for the assertion to be in the correct order (, ) --- test/pummel/test-child-process-spawn-loop.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/pummel/test-child-process-spawn-loop.js b/test/pummel/test-child-process-spawn-loop.js index fdff82a6e4eb34..98653a7360b269 100644 --- a/test/pummel/test-child-process-spawn-loop.js +++ b/test/pummel/test-child-process-spawn-loop.js @@ -34,17 +34,17 @@ function doSpawn(i) { let count = 0; child.stdout.setEncoding('ascii'); - child.stdout.on('data', (chunk) => { + child.stdout.on('data', chunk => { count += chunk.length; }); - child.stderr.on('data', (chunk) => { + child.stderr.on('data', chunk => { console.log(`stderr: ${chunk}`); }); child.on('close', () => { // + 1 for \n or + 2 for \r\n on Windows - assert.strictEqual(SIZE + (common.isWindows ? 2 : 1), count); + assert.strictEqual(count, SIZE + (common.isWindows ? 2 : 1)); if (i < N) { doSpawn(i + 1); } else { From 757174666179ae5c1eab84a41f40b0d4557c34c8 Mon Sep 17 00:00:00 2001 From: Yomar Date: Fri, 21 Jun 2019 15:57:05 -0500 Subject: [PATCH 2/2] test: switch assertion order --- test/pummel/test-child-process-spawn-loop.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/pummel/test-child-process-spawn-loop.js b/test/pummel/test-child-process-spawn-loop.js index 98653a7360b269..f6d8207df85b9b 100644 --- a/test/pummel/test-child-process-spawn-loop.js +++ b/test/pummel/test-child-process-spawn-loop.js @@ -34,11 +34,11 @@ function doSpawn(i) { let count = 0; child.stdout.setEncoding('ascii'); - child.stdout.on('data', chunk => { + child.stdout.on('data', (chunk) => { count += chunk.length; }); - child.stderr.on('data', chunk => { + child.stderr.on('data', (chunk) => { console.log(`stderr: ${chunk}`); });