Skip to content

Commit 4efdbaf

Browse files
malenesok007MylesBorins
authored andcommitted
test: refactor test-child-process-ipc
Change var to const or let. Change assert.equal() to assert.strictEqual(). PR-URL: #9990 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
1 parent dbfec29 commit 4efdbaf

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

‎test/parallel/test-child-process-ipc.js‎

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
'use strict';
2-
varcommon=require('../common');
3-
varassert=require('assert');
42

5-
varspawn=require('child_process').spawn;
3+
constcommon=require('../common');
4+
constassert=require('assert');
65

7-
varpath=require('path');
6+
constspawn=require('child_process').spawn;
87

9-
varsub=path.join(common.fixturesDir,'echo.js');
8+
constpath=require('path');
109

11-
vargotHelloWorld=false;
12-
vargotEcho=false;
10+
constsub=path.join(common.fixturesDir,'echo.js');
1311

14-
varchild=spawn(process.argv[0],[sub]);
12+
letgotHelloWorld=false;
13+
letgotEcho=false;
14+
15+
constchild=spawn(process.argv[0],[sub]);
1516

1617
child.stderr.on('data',function(data){
1718
console.log('parent stderr: '+data);
@@ -23,7 +24,7 @@ child.stdout.on('data', function(data) {
2324
console.log('child said: '+JSON.stringify(data));
2425
if(!gotHelloWorld){
2526
console.error('testing for hello world');
26-
assert.equal('hello world\r\n',data);
27+
assert.strictEqual('hello world\r\n',data);
2728
gotHelloWorld=true;
2829
console.error('writing echo me');
2930
child.stdin.write('echo me\r\n');

0 commit comments

Comments
 (0)